Predeclare class type_info in Microsoft mode, from Francois Pichet!

llvm-svn: 112478
This commit is contained in:
Douglas Gregor 2010-08-30 14:44:26 +00:00
parent cfcb942267
commit 2b1bbecb6b
2 changed files with 8 additions and 0 deletions

View File

@ -343,6 +343,7 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
// FIXME: This should be temporary until we have a __pragma
// solution, to avoid some errors flagged in VC++ headers.
Builder.defineMacro("_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES", "0");
Builder.append("class type_info;");
}
}

View File

@ -0,0 +1,7 @@
// RUN: %clang_cc1 %s -fsyntax-only -verify -fms-extensions
// ::type_info is predeclared with forward class declartion
void f(const type_info &a);