brintos

brintos / llvm-project-archived public Read only

0
0
Text · 907 B · 432b140 Raw
26 lines · cpp
1// RUN: %clang_cc1 -std=c++14 %s -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s2// Ensure no warnings are emitted in c++17.3// RUN: %clang_cc1 -std=c++17 %s -verify=cxx174// RUN: %clang_cc1 -std=c++14 %s -fixit-recompile -fixit-to-temporary -Werror5 6// cxx17-no-diagnostics7 8static_assert(true && "String");9// CHECK-DAG: {[[@LINE-1]]:20-[[@LINE-1]]:22}:","10 11// String literal prefixes are good.12static_assert(true && R"(RawString)");13// CHECK-DAG: {[[@LINE-1]]:20-[[@LINE-1]]:22}:","14 15static_assert(true);16// CHECK-DAG: {[[@LINE-1]]:19-[[@LINE-1]]:19}:", \"\""17 18// While its technically possible to transform this to19// static_assert(true, "String") we don't attempt this fix.20static_assert("String" && true);21// CHECK-DAG: {[[@LINE-1]]:31-[[@LINE-1]]:31}:", \"\""22 23// Don't be smart and look in parentheses.24static_assert((true && "String"));25// CHECK-DAG: {[[@LINE-1]]:33-[[@LINE-1]]:33}:", \"\""26