diff options
| author | Richard Trieu <rtrieu@google.com> | 2015-09-18 23:18:39 +0000 |
|---|---|---|
| committer | Richard Trieu <rtrieu@google.com> | 2015-09-18 23:18:39 +0000 |
| commit | 324da7b207b181593fcd9c0a2b0fef2181f2e2dc (patch) | |
| tree | 8b3ac91bd19f527010c27160ba91efc315d7bb82 /clang/test/Lexer | |
| parent | 8197a4e0bfce9be7c96b2271153b336b4271400e (diff) | |
| download | bcm5719-llvm-324da7b207b181593fcd9c0a2b0fef2181f2e2dc.tar.gz bcm5719-llvm-324da7b207b181593fcd9c0a2b0fef2181f2e2dc.zip | |
Split off the binary literal warning into a subgroup of C++14 warnings
Binary literals predate C++14, but they are listed as a C++14 extension since
this was the first time they were standardized in the language. Move the
warning into a subgroup so it can be selectively disabled when checking for
other C++14 features.
llvm-svn: 248064
Diffstat (limited to 'clang/test/Lexer')
| -rw-r--r-- | clang/test/Lexer/warn_binary_literals.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Lexer/warn_binary_literals.cpp b/clang/test/Lexer/warn_binary_literals.cpp new file mode 100644 index 00000000000..d196be91b5b --- /dev/null +++ b/clang/test/Lexer/warn_binary_literals.cpp @@ -0,0 +1,5 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s -Wc++14-binary-literal +// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s -Wc++14-extensions + +int x = 0b11; +// expected-warning@-1{{binary integer literals are a C++14 extension}} |

