Index: lib/Parse/ParseExpr.cpp =================================================================== --- lib/Parse/ParseExpr.cpp +++ lib/Parse/ParseExpr.cpp @@ -798,7 +798,8 @@ case tok::kw_true: case tok::kw_false: - return ParseCXXBoolLiteral(); + Res = ParseCXXBoolLiteral(); + break; case tok::kw___objc_yes: case tok::kw___objc_no: Index: test/Parser/cxx-bool.cpp =================================================================== --- test/Parser/cxx-bool.cpp +++ test/Parser/cxx-bool.cpp @@ -1,4 +1,11 @@ -// RUN: %clang_cc1 -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only -verify %s +// expected-no-diagnostics bool a = true; bool b = false; + +namespace pr34273 { + char c = "clang"[true]; + char d = true["clang"]; +} +