diff options
| author | Alexander Kornienko <alexfh@google.com> | 2013-06-28 12:51:24 +0000 |
|---|---|---|
| committer | Alexander Kornienko <alexfh@google.com> | 2013-06-28 12:51:24 +0000 |
| commit | a1753f4be12737f36ce9c6eccccddd3be1ec514b (patch) | |
| tree | f30de71e32176ed065a651a5be0aa55c922d693d /lib/CodeGen/CodeGenFunction.cpp | |
| parent | 6982bf4d77bc57a85ee173b631729fce673f16ef (diff) | |
| download | clang-a1753f4be12737f36ce9c6eccccddd3be1ec514b.tar.gz clang-a1753f4be12737f36ce9c6eccccddd3be1ec514b.tar.bz2 clang-a1753f4be12737f36ce9c6eccccddd3be1ec514b.tar.xz | |
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185149 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions
