[cfe-commits] r142903 - in /cfe/trunk: include/clang/Basic/ test/CXX/class/class.friend/ test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/ test/CXX/temp/temp.spec/temp.explicit/ test/Lexer/ test/SemaCXX/

Richard Smith richard at metafoo.co.uk
Mon Oct 24 20:18:33 PDT 2011


On Tue, October 25, 2011 04:07, Douglas Gregor wrote:
> Author: dgregor
> Date: Mon Oct 24 22:07:45 2011
> New Revision: 142903
>
> URL: http://llvm.org/viewvc/llvm-project?rev=142903&view=rev
> Log:
> Make the -Wc++11-compat warnings ignored by default, so we don't break
> valid C++98/03 code. However, add these warnings to -Wall, for those who
> obviously already like clean code.
>
> Modified:
> cfe/trunk/include/clang/Basic/DiagnosticGroups.td
> cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td
> cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
> cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
> cfe/trunk/test/CXX/class/class.friend/p6.cpp
> cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3.cpp
> cfe/trunk/test/CXX/temp/temp.spec/temp.explicit/p2.cpp
> cfe/trunk/test/CXX/temp/temp.spec/temp.explicit/p3.cpp
> cfe/trunk/test/CXX/temp/temp.spec/temp.explicit/p5.cpp
> cfe/trunk/test/Lexer/cxx0x_keyword_as_cxx98.cpp
> cfe/trunk/test/SemaCXX/auto-cxx98.cpp cfe/trunk/test/SemaCXX/class.cpp
> cfe/trunk/test/SemaCXX/decltype-crash.cpp
>
> Modified: cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.t
> ype/dcl.spec.auto/p3.cpp?rev=142903&r1=142902&r2=142903&view=diff
> =============================================================================
> =
> --- cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3.cpp
> (original)
> +++ cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3.cpp Mon Oct
> 24 22:07:45 2011
> @@ -1,5 +1,5 @@
> -// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
> -// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++98 -Wno-c++11-extensions
> +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11 -Wc++11-compat

Hopefully this change isn't necessary?

> +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++98 -Wno-c++11-extensions
> -Wc++11-compat
> void f() { auto a = a; // expected-error{{variable 'a' declared with 'auto'
> type cannot appear in its own initializer}} auto *b = b; //
> expected-error{{variable 'b' declared with 'auto' type cannot appear in its
> own initializer}}




More information about the cfe-commits mailing list