diff --git a/include/clang/Basic/DiagnosticASTKinds.td b/include/clang/Basic/DiagnosticASTKinds.td index 9f0da2d6eb..4f7169dade 100644 --- a/include/clang/Basic/DiagnosticASTKinds.td +++ b/include/clang/Basic/DiagnosticASTKinds.td @@ -13,8 +13,8 @@ let Component = "AST" in { // "C does not permit evaluated commas in an integer constant expression">; def note_expr_divide_by_zero : Note<"division by zero">; def note_constexpr_invalid_cast : Note< - "%select{reinterpret_cast|dynamic_cast|cast interpreted as a " - "reinterpret_cast|cast from %1}0 is not allowed in a constant expression">; + "%select{reinterpret_cast|dynamic_cast|cast which performs the conversions of" + " a reinterpret_cast|cast from %1}0 is not allowed in a constant expression">; // inline asm related. let CategoryName = "Inline Assembly Issue" in { diff --git a/test/SemaCXX/constant-expression-cxx11.cpp b/test/SemaCXX/constant-expression-cxx11.cpp index 3ba76d4299..a7a53e11d4 100644 --- a/test/SemaCXX/constant-expression-cxx11.cpp +++ b/test/SemaCXX/constant-expression-cxx11.cpp @@ -307,16 +307,16 @@ struct Str { expected-note {{reinterpret_cast is not allowed in a constant expression}} int c : (S*)(long)(sptr) == (S*)(long)(sptr); // \ expected-warning {{not integer constant expression}} \ - expected-note {{cast interpreted as a reinterpret_cast is not allowed in a constant expression}} + expected-note {{cast which performs the conversions of a reinterpret_cast is not allowed in a constant expression}} int d : (S*)(42) == (S*)(42); // \ expected-warning {{not integer constant expression}} \ - expected-note {{cast interpreted as a reinterpret_cast is not allowed in a constant expression}} + expected-note {{cast which performs the conversions of a reinterpret_cast is not allowed in a constant expression}} int e : (Str*)(sptr) == (Str*)(sptr); // \ expected-warning {{not integer constant expression}} \ - expected-note {{cast interpreted as a reinterpret_cast is not allowed in a constant expression}} + expected-note {{cast which performs the conversions of a reinterpret_cast is not allowed in a constant expression}} int f : &(Str&)(*sptr) == &(Str&)(*sptr); // \ expected-warning {{not integer constant expression}} \ - expected-note {{cast interpreted as a reinterpret_cast is not allowed in a constant expression}} + expected-note {{cast which performs the conversions of a reinterpret_cast is not allowed in a constant expression}} int g : (S*)(void*)(sptr) == sptr; // \ expected-warning {{not integer constant expression}} \ expected-note {{cast from 'void *' is not allowed in a constant expression}}