[PATCH] D80016: [analyzer] StdLibraryFunctionsChecker: Add support to lookup types

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 26 09:11:47 PDT 2020


martong marked 2 inline comments as done.
martong added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:747
+                          : *FilePtrTy)
+                : None;
+
----------------
balazske wrote:
> The `Optional<QualType>` can be left out from the right side expressions (in the `?` operator part). (A `QualType` should be assignable to `Optional<QualType>`.)
No that cannot be left out. Implicit conversion does not play when trying to determine the common type for the 2nd and 3rd argument of the ternary op. https://stackoverflow.com/questions/32251419/c-ternary-operator-conditional-operator-and-its-implicit-type-conversion-r
So, removing the explicit type I get a compile error.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80016





More information about the cfe-commits mailing list