diff options
author | Alexander Kornienko <alexfh@google.com> | 2013-11-29 15:19:43 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2013-11-29 15:19:43 +0000 |
commit | d7e014572d42f5aa4370f52169a59088c0412246 (patch) | |
tree | 332c6d85be14133172ed6255a500195b43319ee7 /test/Format | |
parent | 1361a6ffccda7080ea923106b62023325a451c0b (diff) |
Added LanguageStandard::LS_JavaScript to gate all JS-specific parsing.
Summary:
Use LS_JavaScript for files ending with ".js". Added support for ">>>="
operator.
Reviewers: djasper, klimek
Reviewed By: djasper
CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D2242
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195961 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Format')
-rw-r--r-- | test/Format/language-detection.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Format/language-detection.cpp b/test/Format/language-detection.cpp new file mode 100644 index 0000000000..bec444dc9d --- /dev/null +++ b/test/Format/language-detection.cpp @@ -0,0 +1,7 @@ +// RUN: grep -Ev "// *[A-Z0-9_]+:" %s > %t.js +// RUN: grep -Ev "// *[A-Z0-9_]+:" %s > %t.cpp +// RUN: clang-format -style=llvm %t.js | FileCheck -strict-whitespace -check-prefix=CHECK1 %s +// RUN: clang-format -style=llvm %t.cpp | FileCheck -strict-whitespace -check-prefix=CHECK2 %s +// CHECK1: {{^a >>>= b;$}} +// CHECK2: {{^a >> >= b;$}} +a >>>= b; |