llvm-project/clang/unittests
Alexander Kornienko 1e80887d63 Use lexing mode based on FormatStyle.Standard.
Summary:
Some valid pre-C++11 constructs change meaning when lexed in C++11
mode, e.g.
#define x(_a) printf("foo"_a);
(example from http://llvm.org/bugs/show_bug.cgi?id=16342). "foo"_a is treated as
a user-defined string literal when parsed in C++11 mode.
In order to deal with this correctly, we need to set lexing mode according to
which standard the code conforms to. We already have a configuration value for
this (FormatStyle.Standard), which seems to be appropriate to use in this case
as well.

Reviewers: klimek

CC: cfe-commits, gribozavr

Differential Revision: http://llvm-reviews.chandlerc.com/D1028

llvm-svn: 185149
2013-06-28 12:51:24 +00:00
..
AST Enhancements for the DynTypedNode 2013-06-19 18:45:24 +00:00
ASTMatchers clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp: Suppress unexpected failures on MS hosts. 2013-06-24 13:19:26 +00:00
Basic [Preprocessor] For the MacroExpands preprocessor callback, also pass the MacroArgs object that provides information about 2013-05-03 22:31:32 +00:00
Format Use lexing mode based on FormatStyle.Standard. 2013-06-28 12:51:24 +00:00
Frontend [Driver] Refactor clang driver to use LLVM's Option library 2013-06-14 17:17:23 +00:00
Lex Include Path.h instead of PathV2.h. 2013-06-11 22:15:02 +00:00
Tooling Sync file handling logic in RewriterTestContext.h and RefactoringTest.cpp. 2013-06-26 21:02:22 +00:00
CMakeLists.txt Turn CLANG_ENABLE_{ARCMT,REWRITER,STATIC_ANALYZER} into proper options so that 2013-05-29 21:09:18 +00:00
Makefile Dont use/link ARCMT, StaticAnalyzer and Rewriter to clang when the user 2012-12-13 16:09:42 +00:00