[cfe-commits] r148242 - in /cfe/trunk: include/clang/AST/ include/clang/Basic/ lib/AST/ lib/CodeGen/ lib/Frontend/ lib/Lex/ lib/Sema/ lib/StaticAnalyzer/Core/ test/CodeGen/ test/Lexer/
Eli Friedman
eli.friedman at gmail.com
Wed Jan 18 17:51:09 PST 2012
On Mon, Jan 16, 2012 at 9:27 AM, David Chisnall <csdavec at swan.ac.uk> wrote:
> Modified: cfe/trunk/lib/Lex/PPMacroExpansion.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPMacroExpansion.cpp?rev=148242&r1=148241&r2=148242&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Lex/PPMacroExpansion.cpp (original)
> +++ cfe/trunk/lib/Lex/PPMacroExpansion.cpp Mon Jan 16 11:27:18 2012
> @@ -626,12 +626,14 @@
> .Case("arc_cf_code_audited", true)
> // C11 features
> .Case("c_alignas", LangOpts.C11)
> + .Case("c_atomic", LangOpts.C11)
> .Case("c_generic_selections", LangOpts.C11)
> .Case("c_static_assert", LangOpts.C11)
> // C++0x features
> .Case("cxx_access_control_sfinae", LangOpts.CPlusPlus0x)
> .Case("cxx_alias_templates", LangOpts.CPlusPlus0x)
> .Case("cxx_alignas", LangOpts.CPlusPlus0x)
> + .Case("cxx_atomic", LangOpts.CPlusPlus0x)
Unfortunately, I'm not sure we can use the name "cxx_atomic"; shipping
versions of libc++ check for cxx_atomic, but are not compatible with
the current implementation.
I'm not sure the semantic analysis here is working quite correctly;
for example, the following doesn't compile:
_Atomic(long) x;
int f() { return x; }
Also, the following:
_Atomic(long) x = 10;
I don't have time to look more closely at it at the moment.
-Eli
More information about the cfe-commits
mailing list