llvm-project/clang/test
Serge Pavlov e50bf75196 Fix recognition of shadowed template parameter
Crash reported in PR28023 is caused by the fact that non-type template
parameters are found by tag name lookup.  In the code provided in that PR:

template<int V> struct A {
  struct B {
    template <int> friend struct V;
  };
};

the template parameter V is found when lookup for redeclarations of 'struct V'
is made. Latter on the error about shadowing of 'V' is emitted but the semantic
context of 'struct V' is already determined wrong: 'struct A' instead of
translation unit.

The fix moves the check for shadowing toward the beginning of the method and
thus prevents from wrong context calculations.

This change fixes PR28023.

llvm-svn: 272366
2016-06-10 04:39:07 +00:00
..
ARCMT Define weak and __weak to mean ARC-style weak references, even in MRC. 2015-10-22 18:38:17 +00:00
ASTMerge Added support to the ASTImporter for C++ constructor initializers. 2016-05-16 20:48:03 +00:00
Analysis Revert "[analyzer] Reapply r271907 (2nd try)." 2016-06-07 05:37:02 +00:00
CXX Fix recognition of shadowed template parameter 2016-06-10 04:39:07 +00:00
CodeCompletion Fix CodeCompletion & TypoCorrection when combining a PCH with Modules 2016-05-04 00:53:13 +00:00
CodeGen RenderScript support in the Frontend 2016-06-09 23:34:20 +00:00
CodeGenCUDA [CUDA] Add implicit conversion of __launch_bounds__ arguments to rvalue. 2016-06-06 22:54:57 +00:00
CodeGenCXX clang/test/CodeGenCXX/debug-info-method.cpp: Tweak for thiscall, for targeting Win32 x86. 2016-06-09 10:06:13 +00:00
CodeGenObjC test: add explicit targets for some tests 2016-05-30 16:36:48 +00:00
CodeGenObjCXX Fix mangled name of method with ns_consumed parameters. 2016-05-25 14:15:08 +00:00
CodeGenOpenCL [OpenCL] Fix __builtin_astype for vec3 types. 2016-06-08 15:11:21 +00:00
Coverage
CoverageMapping Reapply [Coverage] Fix an assertion failure if the definition of an unused function spans multiple files. 2016-06-07 10:07:51 +00:00
Driver Add a RenderScript language type 2016-06-09 21:57:40 +00:00
FixIt FixIt: use getLocForEndOfToken to insert fix-it after a type name. 2016-06-02 00:11:03 +00:00
Format Fix clang-format test. I believe that the new behavior is better. 2015-11-23 08:50:52 +00:00
Frontend Add a loop's debug location to its llvm.loop metadata 2016-05-25 21:53:24 +00:00
Headers [OpenCL] Remove tests without triple from test/Headers/opencl-c-header.cl. 2016-05-30 06:42:48 +00:00
Index Make sizeof and alignof a CXCursor_UnaryExpr 2016-06-09 16:16:06 +00:00
Integration
Layout [MS ABI] Implement __declspec(empty_bases) and __declspec(layout_version) 2016-05-23 17:16:12 +00:00
Lexer Revert commit r271708 2016-06-04 03:14:43 +00:00
Misc Fix a crash in the AST dumper. 2016-06-09 22:03:04 +00:00
Modules Redirect unused output in test to /dev/null 2016-06-09 22:39:20 +00:00
OpenMP [OPENMP 4.5] Additional codegen for statically scheduled loops with 2016-05-30 13:05:14 +00:00
PCH Revert commit r271708 2016-06-04 03:14:43 +00:00
Parser Disable warning about core features by default 2016-06-01 18:04:53 +00:00
Preprocessor Add a few missing Clang regression tests for Cortex-A53, Cortex-A57, Cortex-A72 2016-06-03 08:47:56 +00:00
Profile [profile] Fix another use of the driver. 2016-04-23 02:13:48 +00:00
Rewriter
Sema RenderScript support in the Frontend 2016-06-09 23:34:20 +00:00
SemaCUDA [CUDA] Add implicit conversion of __launch_bounds__ arguments to rvalue. 2016-06-06 22:54:57 +00:00
SemaCXX [Sema] Don't crash when a field w/ a mem-initializer clashes with a record name 2016-06-09 05:26:56 +00:00
SemaObjC ObjC lifetime: pull sugar off when the qualifiers conflict. 2016-06-01 17:14:19 +00:00
SemaObjCXX Obj-C: Fix assert-on-invalid (PR27822) 2016-06-03 16:59:13 +00:00
SemaOpenCL [OpenCL] Fix __builtin_astype for vec3 types. 2016-06-08 15:11:21 +00:00
SemaTemplate [MSVC] Fix stack overflow in unqualified type lookup logic, by Will 2016-05-31 06:21:27 +00:00
TableGen
Tooling Back out the test case for r266973 for now. 2016-04-21 10:46:14 +00:00
Unit Replace hardcoded comment at 'lit.site.cfg.in' 2016-04-16 06:54:46 +00:00
VFS [VFS] Fix status() of opened redirected file 2015-12-10 23:41:39 +00:00
.clang-format
CMakeLists.txt check-clang: LTO, aka libLTO.so, was redundant here, since llvm-lto depends on it. 2016-06-05 00:12:59 +00:00
TestRunner.sh
cxx-sections.data
lit.cfg Add a RenderScript language type 2016-06-09 21:57:40 +00:00
lit.site.cfg.in Replace hardcoded comment at 'lit.site.cfg.in' 2016-04-16 06:54:46 +00:00
make_test_dirs.pl