martong added inline comments.

================
Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:270-272
+    default:
+      llvm_unreachable("Invalid template argument for isa<> or "
+                       "isa_and_nonnull<>");
----------------
baloghadamsoftware wrote:
> NoQ wrote:
> > We shouldn't crash when code under analysis doesn't match our expectation.
> The question is whether we can get any other template argument kind for 
> `llvm::isa<>()` and `llvm::isa_and_nonnull<>()` than `Type` or `Pack`?
I think it is worth to ponder about the below case. What if `isa` is used in a 
dependent context (i.e. it is used inside another template)?
```
    /// The template argument is an expression, and we've not resolved it to one
    /// of the other forms yet, either because it's dependent or because we're
    /// representing a non-canonical template argument (for instance, in a
    /// TemplateSpecializationType).
    Expression,
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85728/new/

https://reviews.llvm.org/D85728

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to