[cfe-commits] r144341 - in /cfe/trunk: lib/Sema/SemaOverload.cpp test/SemaCXX/MicrosoftCompatibility.cpp test/SemaTemplate/ms-lookup-template-base-classes.cpp

Francois Pichet pichet2000 at gmail.com
Thu Nov 10 16:12:11 PST 2011


Author: fpichet
Date: Thu Nov 10 18:12:11 2011
New Revision: 144341

URL: http://llvm.org/viewvc/llvm-project?rev=144341&view=rev
Log:
Move "Unqualified lookup into dependent bases of class templates" Microsoft specific behavior from -fms-extensions to -fms-compatibility.

Modified:
    cfe/trunk/lib/Sema/SemaOverload.cpp
    cfe/trunk/test/SemaCXX/MicrosoftCompatibility.cpp
    cfe/trunk/test/SemaTemplate/ms-lookup-template-base-classes.cpp

Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=144341&r1=144340&r2=144341&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Thu Nov 10 18:12:11 2011
@@ -8705,7 +8705,7 @@
     // create a type dependent CallExpr. The goal is to postpone name lookup
     // to instantiation time to be able to search into type dependent base
     // classes.
-    if (getLangOptions().MicrosoftExt && CurContext->isDependentContext() && 
+    if (getLangOptions().MicrosoftMode && CurContext->isDependentContext() && 
         isa<CXXMethodDecl>(CurContext)) {
       CallExpr *CE = new (Context) CallExpr(Context, Fn, Args, NumArgs,
                                           Context.DependentTy, VK_RValue,

Modified: cfe/trunk/test/SemaCXX/MicrosoftCompatibility.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/MicrosoftCompatibility.cpp?rev=144341&r1=144340&r2=144341&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/MicrosoftCompatibility.cpp (original)
+++ cfe/trunk/test/SemaCXX/MicrosoftCompatibility.cpp Thu Nov 10 18:12:11 2011
@@ -137,22 +137,3 @@
 
 
 
-namespace lookup_dependent_bases_id_expr {
-
-template<class T> class A {
-public:
-  int var;
-};
-
-
-template<class T>
-class B : public A<T> {
-public:
-  void f() {
-    var = 3;
-  }
-};
-
-template class B<int>;
-
-}

Modified: cfe/trunk/test/SemaTemplate/ms-lookup-template-base-classes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/ms-lookup-template-base-classes.cpp?rev=144341&r1=144340&r2=144341&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/ms-lookup-template-base-classes.cpp (original)
+++ cfe/trunk/test/SemaTemplate/ms-lookup-template-base-classes.cpp Thu Nov 10 18:12:11 2011
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fms-extensions -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fms-compatibility -fsyntax-only -verify %s
 
 
 template <class T>
@@ -28,4 +28,23 @@
     b.z(3);
 }
 
+namespace lookup_dependent_bases_id_expr {
+
+template<class T> class A {
+public:
+  int var;
+};
+
+
+template<class T>
+class B : public A<T> {
+public:
+  void f() {
+    var = 3;
+  }
+};
+
+template class B<int>;
+
+}
 





More information about the cfe-commits mailing list