Add 'l' constraint to goto label reference
authorBill Wendling <isanbard@gmail.com>
Tue, 25 Feb 2020 19:45:56 +0000 (11:45 -0800)
committerBill Wendling <isanbard@gmail.com>
Tue, 25 Feb 2020 19:48:23 +0000 (11:48 -0800)
A goto label uses the 'l' constraint, skipping it can cause unexpected
warnings.

clang/test/Analysis/uninit-asm-goto.cpp

index ce2ca81..74ef261 100644 (file)
@@ -3,7 +3,7 @@
 
 int test1(int x) {
     int y;
-    asm goto("# %0 %1 %2" : "=r"(y) : "r"(x) : : err);
+    asm goto("# %0 %1 %l2" : "=r"(y) : "r"(x) : : err);
     return y;
   err:
     return -1;