Before:
#if AAAA &&BBBB
After:
#if AAAA && BBBB
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199713
91177308-0d34-0410-b5e6-
96231b3b80d8
break;
case tok::pp_if:
case tok::pp_elif:
+ Contexts.back().IsExpression = true;
parseLine();
break;
default:
parsePreprocessorDirective();
return LT_PreprocessorDirective;
}
-
+
// Directly allow to 'import <string-literal>' to support protocol buffer
// definitions (code.google.com/p/protobuf) or missing "#" (either way we
// should not break the line).
}
TEST_F(FormatTest, FormatHashIfExpressions) {
+ verifyFormat("#if AAAA && BBBB");
// FIXME: Come up with a better indentation for #elif.
verifyFormat(
"#if !defined(AAAAAAA) && (defined CCCCCC || defined DDDDDD) && \\\n"