[clang] 5c22e2b - Workaround a -Wmisleading-indentation warning

Stephen Kelly via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 10 15:12:59 PST 2021


Author: Stephen Kelly
Date: 2021-03-10T23:12:31Z
New Revision: 5c22e2bec008760cc7078d8d14382ef4762c5d54

URL: https://github.com/llvm/llvm-project/commit/5c22e2bec008760cc7078d8d14382ef4762c5d54
DIFF: https://github.com/llvm/llvm-project/commit/5c22e2bec008760cc7078d8d14382ef4762c5d54.diff

LOG: Workaround a -Wmisleading-indentation warning

Because the generated code is not formatted, it can cause warnings.

Added: 
    

Modified: 
    clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py

Removed: 
    


################################################################################
diff  --git a/clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py b/clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py
index dee7a416e69a..aafae2c15b29 100755
--- a/clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py
+++ b/clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py
@@ -171,7 +171,7 @@ def GenerateDynNodeVisitor(self, CladeNames):
     if (const auto *N = Node.get<{0}>())
       return GetLocations(const_cast<{0} *>(N));""".format(CladeName)
 
-        self.implementationContent += 'return {}; }'
+        self.implementationContent += '\nreturn {}; }'
 
     def GenerateEpilogue(self):
 


        


More information about the cfe-commits mailing list