[clang-tools-extra] r360009 - Fix test to avoid assuming clang will diagnose problems in unreachable code.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Sun May 5 21:07:30 PDT 2019


Author: rsmith
Date: Sun May  5 21:07:30 2019
New Revision: 360009

URL: http://llvm.org/viewvc/llvm-project?rev=360009&view=rev
Log:
Fix test to avoid assuming clang will diagnose problems in unreachable code.

Modified:
    clang-tools-extra/trunk/clangd/unittests/DiagnosticsTests.cpp

Modified: clang-tools-extra/trunk/clangd/unittests/DiagnosticsTests.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/unittests/DiagnosticsTests.cpp?rev=360009&r1=360008&r2=360009&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/unittests/DiagnosticsTests.cpp (original)
+++ clang-tools-extra/trunk/clangd/unittests/DiagnosticsTests.cpp Sun May  5 21:07:30 2019
@@ -171,6 +171,8 @@ TEST(DiagnosticsTest, ClangTidy) {
     #define $macrodef[[SQUARE]](X) (X)*(X)
     int main() {
       return $doubled[[sizeof]](sizeof(int));
+    }
+    int square() {
       int y = 4;
       return SQUARE($macroarg[[++]]y);
     }




More information about the cfe-commits mailing list