llvm-project/clang/test
Faisal Vali cc496a9977 Fix PR26134: When substituting into default template arguments, keep CurContext unchanged.
Or, do not set Sema's CurContext to the template declaration's when substituting into default template arguments of said template declaration.   
If we do push the template declaration context on to Sema, and the template declaration is at namespace scope, Sema can get confused and try and do odr analysis when substituting into default template arguments, even though the substitution could be occurring within a dependent context.
I'm not sure why this was being done, perhaps there was concern that if a default template argument referred to a previous template parameter, it might not be found during substitution - but all regression tests pass, and I can't craft a test that would cause it to fails (if some one does, please inform me, and i'll craft a different fix for the PR).


This patch removes a single line of code, but unfortunately adds more than it removes, because of the tests.  Some day I still hope to commit a patch that removes far more lines than it adds, while leaving clang better for it ;)

Sorry that r253590 ("Change the expression evaluation context from Unevaluated to ConstantEvaluated while substituting into non-type template argument defaults") caused the PR!

llvm-svn: 258110
2016-01-19 03:58:55 +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 Update tests touched by r249656 2015-10-08 06:31:22 +00:00
Analysis [analyzer] Nullability: Look through implicit casts when suppressing warnings on return. 2016-01-18 18:53:33 +00:00
CXX PR26048, PR26050: put non-type template parameters and indirect field decls 2016-01-06 22:49:11 +00:00
CodeCompletion [Tests] Modified Lit Tests to be C++11 compatibile 2015-08-27 18:49:15 +00:00
CodeGen Introduce -fsanitize-stats flag. 2016-01-16 00:31:22 +00:00
CodeGenCUDA [CUDA] Make vtable construction aware of host/device side of CUDA compilation. 2015-12-17 18:12:36 +00:00
CodeGenCXX [MS ABI] Don't crash while mangling recursive lambdas 2016-01-17 07:09:24 +00:00
CodeGenObjC Objective-C properties: merge attributes when redeclaring 'readonly' as 'readwrite' in an extension. 2015-12-10 23:02:09 +00:00
CodeGenObjCXX Reapply "[CodeGen] Fix assignments of inline layouts into the byref structure" 2015-12-21 20:21:15 +00:00
CodeGenOpenCL [Bugfix] Fix ICE on constexpr vector splat. 2016-01-13 01:52:39 +00:00
Coverage Stop messing with the 'g' group of options in CompilerInvocation. 2015-10-08 04:24:12 +00:00
CoverageMapping [PGO] Cleanup: Use covmap header definition in the template file 2016-01-03 19:25:54 +00:00
Driver clang/test/Driver/darwin-multiarch-arm.c: Appease the case that "ld.exe" exists on %PATH% on win32. 2016-01-16 08:35:53 +00:00
FixIt [Lit Test] Updated 26 Lit tests to be C++11 compatible. 2015-11-11 19:34:47 +00:00
Format Fix clang-format test. I believe that the new behavior is better. 2015-11-23 08:50:52 +00:00
Frontend Preprocessor: define correct tvOS and watchOS version macros 2015-10-30 16:30:30 +00:00
Headers Make ms-intrin.cpp test require the x86 target. 2015-09-23 00:24:34 +00:00
Index [libclang] Introduce APIs for evaluating a cursor and checking if a macro is builtin/function. 2016-01-16 00:20:02 +00:00
Integration
Layout [MS] Fix for bug 25013 - #pragma vtordisp is unknown inside functions, by Denis Zobnin. 2015-11-20 07:02:57 +00:00
Lexer Fix test from r256596 2015-12-29 23:23:38 +00:00
Misc Fixing more issues with template type diffing 2016-01-15 05:48:38 +00:00
Modules [modules] Don't diagnose a conflict between two using-declarations that name equivalent internal linkage entities. 2016-01-12 20:34:32 +00:00
OpenMP Add OpenMP dist_schedule clause to distribute directive and related regression tests. 2016-01-15 18:50:31 +00:00
PCH [OpenCL] Pipe type support 2016-01-09 12:53:17 +00:00
Parser Fix several accidental DOS line endings in source files 2016-01-03 15:55:40 +00:00
Preprocessor When copying whitespace flags from the token naming a macro argument onto the 2016-01-15 03:24:18 +00:00
Profile Remove setting of inlinehint and cold attributes based on profile data 2016-01-04 23:32:28 +00:00
Rewriter Stop messing with the 'g' group of options in CompilerInvocation. 2015-10-08 04:24:12 +00:00
Sema PR26111: segmentation fault with __attribute__((mode(QI))) on function declaration, by Denis Zobnin 2016-01-15 04:36:32 +00:00
SemaCUDA [CUDA] Warn undeclared identifiers in CUDA kernel calls 2016-01-14 23:31:30 +00:00
SemaCXX Make -Wdelete-non-virtual-dtor warn on explicit `a->~A()` dtor calls too. 2016-01-15 21:45:31 +00:00
SemaObjC [Sema] Suppress diags in overload resolution. 2016-01-13 23:36:34 +00:00
SemaObjCXX Allow pseudo-destructor calls on forward-declared Objective-C class pointers. 2015-12-14 19:12:54 +00:00
SemaOpenCL [OpenCL] Pipe type support 2016-01-09 12:53:17 +00:00
SemaTemplate Fix PR26134: When substituting into default template arguments, keep CurContext unchanged. 2016-01-19 03:58:55 +00:00
TableGen
Tooling int function without a return statement is invalid C++. 2015-11-27 18:10:49 +00:00
Unit
VFS [VFS] Fix status() of opened redirected file 2015-12-10 23:41:39 +00:00
.clang-format
CMakeLists.txt [ThinLTO] Option to invoke ThinLTO backend passes and importing 2015-12-07 19:21:34 +00:00
Makefile
TestRunner.sh
cxx-sections.data
lit.cfg Prune the feature "tls". No one is using it since TLS is enabled for Cygwin. 2015-12-27 06:14:33 +00:00
lit.site.cfg.in
make_test_dirs.pl