Home
last modified time | relevance | path

Searched refs:mayEverNeedParens (Results 1 – 3 of 3) sorted by relevance

/external/llvm-project/clang/unittests/Tooling/
DSourceCodeBuildersTest.cpp110 TEST(SourceCodeBuildersTest, mayEverNeedParens) { in TEST() argument
111 testPredicate(mayEverNeedParens, "3 + 5;", true); in TEST()
112 testPredicate(mayEverNeedParens, "true ? 3 : 5;", true); in TEST()
113 testPredicate(mayEverNeedParens, "int x = 1; --x;", true); in TEST()
114 testPredicate(mayEverNeedParens, "int x = 1; -x;", true); in TEST()
116 testPredicate(mayEverNeedParens, "int x; x;", false); in TEST()
117 testPredicate(mayEverNeedParens, "int(3.0);", false); in TEST()
118 testPredicate(mayEverNeedParens, "void f(); f();", false); in TEST()
119 testPredicate(mayEverNeedParens, "int a[3]; a[0];", false); in TEST()
120 testPredicate(mayEverNeedParens, "S x; x.field;", false); in TEST()
[all …]
/external/llvm-project/clang/include/clang/Tooling/Transformer/
DSourceCodeBuilders.h33 bool mayEverNeedParens(const Expr &E);
40 return mayEverNeedParens(E); in needParensBeforeDotOrArrow()
/external/llvm-project/clang/lib/Tooling/Transformer/
DSourceCodeBuilders.cpp30 bool tooling::mayEverNeedParens(const Expr &E) { in mayEverNeedParens() function in tooling
68 if (mayEverNeedParens(E)) in buildParens()