llvm-project/clang/tools/clang-format
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
..
CMakeLists.txt
ClangFormat.cpp Use lexing mode based on FormatStyle.Standard. 2013-06-28 12:51:24 +00:00
Makefile [Driver] Refactor clang driver to use LLVM's Option library 2013-06-14 17:17:23 +00:00
clang-format-bbedit.applescript Basic clang-format integration for BBEdit. 2013-05-02 17:37:36 +00:00
clang-format-diff.py Fix default value of clang-format-diff's -p option. 2013-05-30 11:50:20 +00:00
clang-format-sublime.py Add basic clang-format integration for sublime text. 2013-05-16 15:08:25 +00:00
clang-format.el Make it possible to assign clang-format-buffer to a keybinding. 2013-06-11 12:00:24 +00:00
clang-format.py [clang-format] Don't flash an ugly cmd prompt in Vim on Windows 2013-06-10 14:16:26 +00:00
git-clang-format clang-format integration for git. 2013-05-23 17:53:42 +00:00