1 // RUN: %clang_cc1 -std=c++14 %s -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s 2 // Ensure no warnings are emitted in c++17. 3 // RUN: %clang_cc1 -std=c++17 %s -verify=cxx17 4 // RUN: %clang_cc1 -std=c++14 %s -fixit-recompile -fixit-to-temporary -Werror 5 6 // cxx17-no-diagnostics 7 8 static_assert(true && "String"); 9 // CHECK-DAG: {[[@LINE-1]]:20-[[@LINE-1]]:22}:"," 10 11 // String literal prefixes are good. 12 static_assert(true && R"(RawString)"); 13 // CHECK-DAG: {[[@LINE-1]]:20-[[@LINE-1]]:22}:"," 14 static_assert(true && L"RawString"); 15 // CHECK-DAG: {[[@LINE-1]]:20-[[@LINE-1]]:22}:"," 16 17 static_assert(true); 18 // CHECK-DAG: {[[@LINE-1]]:19-[[@LINE-1]]:19}:", \"\"" 19 20 // While its technically possible to transform this to 21 // static_assert(true, "String") we don't attempt this fix. 22 static_assert("String" && true); 23 // CHECK-DAG: {[[@LINE-1]]:31-[[@LINE-1]]:31}:", \"\"" 24 25 // Don't be smart and look in parentheses. 26 static_assert((true && "String")); 27 // CHECK-DAG: {[[@LINE-1]]:33-[[@LINE-1]]:33}:", \"\"" 28