[clang] [clang-format] Option to ignore PP directives (PR #70338)

via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 18 04:52:45 PST 2023


================
@@ -1134,6 +1134,14 @@ void UnwrappedLineParser::parsePPDefine() {
     return;
   }
 
+  if (Style.IgnorePPDefinitions) {
+    do {
+      nextToken();
+    } while (!eof());
----------------
tomekpaszek wrote:

In this case, `eof` is a marker for the end of the unwrapped line that is being parsed. It's a pattern used in other parts of the file. 

https://github.com/llvm/llvm-project/pull/70338


More information about the cfe-commits mailing list