[PATCH] Diagnose jumping from one MS inline assembly block to another.

Reid Kleckner rnk at google.com
Mon Sep 29 10:51:33 PDT 2014


================
Comment at: lib/Sema/JumpDiagnostics.cpp:496
@@ -487,1 +495,3 @@
 void JumpScopeChecker::VerifyJumps() {
+  std::map<StringRef, MSAsmStmt*> LabelProvider;
+  for (Stmt *J : Jumps) {
----------------
At a high level, I feel like we shouldn't need this map. It basically reinvents the label name lookup that sema is already performing for us.

What if we changed LabelDecl to hold an MSAsmStmt*? Conceptually, we could make TheStmt be a Stmt* and getStmt() could be 'return dyn_cast_or_null<LabelStmt>(TheStmt);'.

http://reviews.llvm.org/D5516






More information about the cfe-commits mailing list