]> granicus.if.org Git - clang/commitdiff
Predeclare class type_info in Microsoft mode, from Francois Pichet!
authorDouglas Gregor <dgregor@apple.com>
Mon, 30 Aug 2010 14:44:26 +0000 (14:44 +0000)
committerDouglas Gregor <dgregor@apple.com>
Mon, 30 Aug 2010 14:44:26 +0000 (14:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112478 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/InitPreprocessor.cpp
test/SemaCXX/MicrosoftExtensions.cpp [new file with mode: 0644]

index 29a8bec1f6e12469eb8387a77f8d821dff99b642..538e6e2c64ef7d6a4eb756e686fceebb5ba3ee8e 100644 (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;");
     }
   }
 
diff --git a/test/SemaCXX/MicrosoftExtensions.cpp b/test/SemaCXX/MicrosoftExtensions.cpp
new file mode 100644 (file)
index 0000000..c143e59
--- /dev/null
@@ -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);
+
+