================
@@ -2509,6 +2509,20 @@ bool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec 
&SS, LookupResult &R,
     DC = DC->getLookupParent();
   }
 
+  // Check whether a similar function-like macro exists and suggest it
----------------
StarOne01 wrote:

Hey, thanks for asking, let me explain myself.

If i understand it right, [that particular conditional 
statement](https://github.com/llvm/llvm-project/blob/main/clang%2Flib%2FSema%2FSemaExpr.cpp#L2525-L2526)
 should get executed for this:

```c
int main(){
    int var1 = 63;
    int out = var;
}
```
and should be skipped for:

```c
int main(){
    int var1 = 63;
    int out = notFound;
}
```

but the problem is that the conditional statement gets executed for **both the 
cases**, so when i put the new check somewhere below it, the control _never_ 
reaches the new check.

https://github.com/llvm/llvm-project/pull/123495
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to