Community
Participate
Working Groups
Build Identifier: 20110916-0149 testcase: if (llvm::Value * c = dyn_cast<llvm::Value>(val)) { } The analyzer marks "c" as unresolved symbol and therefore assumes that there might be an invalid assignment in the condition. Workaround: If the assignment is moved outside the if clause, it works as expected. llvm::Value * c = dyn_cast<llvm::Value>(val) if (c) { Reproducible: Always
I get no errors or warnings with CDT 8.2 (Kepler).
CDT (8.6 and before) has problems with llvm::dyn_cast template. dyn_cast is reported as unresolved symbol.
(In reply to Missing name from comment #2) > CDT (8.6 and before) has problems with llvm::dyn_cast template. dyn_cast is > reported as unresolved symbol. That sounds like a different issue - this bug is about a false-positive "possible assignment in condition" warning. Could you file a new bug for the issue you're having, preferably with a complete testcase?
Closing per comment 1. Feel free to reopen if you're still seeing this issue.