Commit Graph

4 Commits

Author SHA1 Message Date
Simon Pilgrim a30b5c5a51 Fix MSVC "not all control paths return a value" warning. NFC.
Add llvm_unreachable after switch statement for TestLanguage enum
2020-06-05 10:45:59 +01:00
Dmitri Gribenko b5fc1deb5b Use libClangTesting in the unittest for AST matchers
Summary:
The unittest for AST matchers has its own way to specify language
standards. I unified it with the shared infrastructure from
libClangTesting.

Reviewers: jdoerfert, hlopko

Reviewed By: hlopko

Subscribers: mgorny, sstefan1, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D81150
2020-06-04 17:40:39 +02:00
Dmitri Gribenko d559185aae 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
2020-06-02 16:31:20 +02:00
Dmitri Gribenko 0e265e3157 Move unittest helpers to a shared location
Summary:
unittests/AST/Language.h defines some helpers that we would like to
reuse in other tests, for example, in tests for syntax trees.

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: mgorny, martong, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80792
2020-05-29 16:47:33 +02:00