[PATCH] ms-inline-asm: Scope inline asm labels to functions
Reid Kleckner
rnk at google.com
Wed Sep 17 20:26:50 PDT 2014
lgtm
================
Comment at: include/clang/Sema/ScopeInfo.h:323-331
@@ -319,6 +322,11 @@
+ void setHasInlineMSAsmBlocks() {
+ HasInlineMSAsmBlocks = true;
+ }
+
bool NeedsScopeChecking() const {
- return !HasDroppedStmt &&
+ return HasInlineMSAsmBlocks ||
+ (!HasDroppedStmt &&
(HasIndirectGoto ||
- (HasBranchProtectedScope && HasBranchIntoScope));
+ (HasBranchProtectedScope && HasBranchIntoScope)));
}
----------------
Is it enough to say setHasBranchProtectedScope() instead of setHasInlineMSAsmBlocks()? I would say that an MS inline asm blob is a "protected scope" and add it to the list of things above HasBranchProtectedScope.
http://reviews.llvm.org/D4589
More information about the cfe-commits
mailing list