aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2021-06-04 15:50:44 -0400
committerAaron Ballman <aaron@aaronballman.com>2021-06-04 15:52:07 -0400
commitca68f3bc48e48f839142de1461e95d87ae48e9df (patch)
tree5e95d65981efd00a0a8b31e6206d7643695c3408 /llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
parent1e6d135325357d8c32fd0b0d7f668cad91d478bc (diff)
downloadllvm-ca68f3bc48e48f839142de1461e95d87ae48e9df.zip
llvm-ca68f3bc48e48f839142de1461e95d87ae48e9df.tar.gz
llvm-ca68f3bc48e48f839142de1461e95d87ae48e9df.tar.bz2
Fix a diagnoses-valid bug with using declarations
The following was found by a customer and is accepted by the other primary C++ compilers, but fails to compile in Clang: namespace sss { double foo(int, double); template <class T> T foo(T); // note: target of using declaration } // namespace sss namespace oad { void foo(); } namespace oad { using ::sss::foo; } namespace sss { using oad::foo; // note: using declaration } namespace sss { double foo(int, double) { return 0; } template <class T> T foo(T t) { // error: declaration conflicts with target of using return t; } } // namespace sss I believe the issue is that MergeFunctionDecl() was calling checkUsingShadowRedecl() but only considering a FunctionDecl as a possible shadow and not FunctionTemplateDecl. The changes in this patch largely mirror how variable declarations were being handled by also catching FunctionTemplateDecl.
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopRotationUtils.cpp')
0 files changed, 0 insertions, 0 deletions