[PATCH] D88384: [OpenMP][FIX] Verify compatible types for declare variant calls

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 27 14:17:09 PDT 2020


jdoerfert created this revision.
jdoerfert added reviewers: JonChesterfield, jhuber6, ABataev, aaron.ballman, ye-luo.
Herald added subscribers: guansong, bollu, yaxunl.
Herald added a project: clang.
jdoerfert requested review of this revision.
Herald added a subscriber: sstefan1.

Especially for templates we need to check at some point if the base
function matches the specialization we might call instead. Before this
lead to the replacement of `std::sqrt(int(2))` calls with one that
converts the argument to a `std::complex<int>`, clearly not the desired
behavior.

Reported as PR47655


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88384

Files:
  clang/lib/Sema/SemaOpenMP.cpp
  clang/test/AST/ast-dump-openmp-begin-declare-variant_template_3.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88384.294566.patch
Type: text/x-patch
Size: 23548 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200927/e890ed7b/attachment-0001.bin>


More information about the cfe-commits mailing list