[cfe-commits] r112478 - in /cfe/trunk: lib/Frontend/InitPreprocessor.cpp test/SemaCXX/MicrosoftExtensions.cpp
Douglas Gregor
dgregor at apple.com
Mon Aug 30 07:44:26 PDT 2010
Author: dgregor
Date: Mon Aug 30 09:44:26 2010
New Revision: 112478
URL: http://llvm.org/viewvc/llvm-project?rev=112478&view=rev
Log:
Predeclare class type_info in Microsoft mode, from Francois Pichet!
Added:
cfe/trunk/test/SemaCXX/MicrosoftExtensions.cpp (with props)
Modified:
cfe/trunk/lib/Frontend/InitPreprocessor.cpp
Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitPreprocessor.cpp?rev=112478&r1=112477&r2=112478&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original)
+++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Mon Aug 30 09:44:26 2010
@@ -343,6 +343,7 @@
// 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;");
}
}
Added: cfe/trunk/test/SemaCXX/MicrosoftExtensions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/MicrosoftExtensions.cpp?rev=112478&view=auto
==============================================================================
--- cfe/trunk/test/SemaCXX/MicrosoftExtensions.cpp (added)
+++ cfe/trunk/test/SemaCXX/MicrosoftExtensions.cpp Mon Aug 30 09:44:26 2010
@@ -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);
+
+
Propchange: cfe/trunk/test/SemaCXX/MicrosoftExtensions.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cfe/trunk/test/SemaCXX/MicrosoftExtensions.cpp
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cfe/trunk/test/SemaCXX/MicrosoftExtensions.cpp
------------------------------------------------------------------------------
svn:mime-type = text/plain
More information about the cfe-commits
mailing list