[PATCH] D84817: Add verification for DW_AT_decl_file and DW_AT_call_file.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 30 01:26:43 PDT 2020


jhenderson accepted this revision.
jhenderson added a comment.
This revision is now accepted and ready to land.

Aside from the braces issue mentioned inline, LGTM.



================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp:556
+        }
+      } else {
+        ReportError("DIE has " + AttributeString(Attr) +
----------------
Higuoxing wrote:
> I think the brackets for `else` can be removed.
My reading of recent updates to https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements is that if the `if` or `else` requires braces, the other half should too, so I think we actually want them here.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp:562
+      }
+    } else {
+      ReportError("DIE has " + AttributeString(Attr) +
----------------
Higuoxing wrote:
> The brackets for `else` can be removed as well.
Same comment as above.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84817/new/

https://reviews.llvm.org/D84817



More information about the llvm-commits mailing list