diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2020-06-02 16:10:39 +0200 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2020-06-02 16:31:20 +0200 |
commit | d559185aaebeb66456edb63b47da5a2f67a0a5e2 (patch) | |
tree | 3ce1a2b70a8b122b179c558a6ba0dcf3291be8a2 /clang/unittests/AST/SourceLocationTest.cpp | |
parent | aa3a85cdaa4432ca389bdbf48049eaa64dc6e266 (diff) | |
download | llvm-d559185aaebeb66456edb63b47da5a2f67a0a5e2.zip llvm-d559185aaebeb66456edb63b47da5a2f67a0a5e2.tar.gz llvm-d559185aaebeb66456edb63b47da5a2f67a0a5e2.tar.bz2 |
Renamed Lang_C to Lang_C99, Lang_CXX to Lang_CXX03, and 2a to 20
Summary:
I think we would be better off with tests explicitly specifying the
language mode. Right now Lang_C means C99, but reads as "any C version",
or as "unspecified C version".
I also changed '-std=c++98' to '-std=c++03' because they are aliases (so
there is no difference in practice), because Clang implements C++03
rules in practice, and because 03 makes a nice sortable progression
between 03, 11, 14, 17, 20.
Reviewers: shafik, hlopko
Reviewed By: hlopko
Subscribers: jfb, martong, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81000
Diffstat (limited to 'clang/unittests/AST/SourceLocationTest.cpp')
-rw-r--r-- | clang/unittests/AST/SourceLocationTest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/unittests/AST/SourceLocationTest.cpp b/clang/unittests/AST/SourceLocationTest.cpp index ef82a02..cb96afe 100644 --- a/clang/unittests/AST/SourceLocationTest.cpp +++ b/clang/unittests/AST/SourceLocationTest.cpp @@ -82,13 +82,13 @@ TEST(LabelStmt, Range) { TEST(ParmVarDecl, KNRLocation) { LocationVerifier<ParmVarDecl> Verifier; Verifier.expectLocation(1, 8); - EXPECT_TRUE(Verifier.match("void f(i) {}", varDecl(), Lang_C)); + EXPECT_TRUE(Verifier.match("void f(i) {}", varDecl(), Lang_C99)); } TEST(ParmVarDecl, KNRRange) { RangeVerifier<ParmVarDecl> Verifier; Verifier.expectRange(1, 8, 1, 8); - EXPECT_TRUE(Verifier.match("void f(i) {}", varDecl(), Lang_C)); + EXPECT_TRUE(Verifier.match("void f(i) {}", varDecl(), Lang_C99)); } TEST(CXXNewExpr, ArrayRange) { @@ -814,7 +814,7 @@ TEST(FunctionDecl, ExceptionSpecifications) { std::vector<std::string> Args; Args.push_back("-fms-extensions"); EXPECT_TRUE(Verifier.match("void f() throw(...);\n", loc(functionType()), - Args, Lang_CXX)); + Args, Lang_CXX03)); Verifier.expectRange(1, 10, 1, 10); EXPECT_TRUE( |