- Mar 05, 2011
-
-
Matt Beaumont-Gay authored
llvm-svn: 127061
-
Douglas Gregor authored
use the translation unit as its declaration context, then deserialize the actual lexical and semantic DeclContexts after the template parameter is complete. This avoids problems when the DeclContext itself (e.g., a class template) is dependent on the template parameter (e.g., for the injected-class-name). llvm-svn: 127056
-
Argyrios Kyrtzidis authored
Currently we can only remap a file by creating a MemoryBuffer and replacing the file contents with it. Allow remapping a file by specifying another filename whose contents should be loaded if the original file gets loaded. This allows to override files without having to create & load buffers in advance. llvm-svn: 127052
-
Argyrios Kyrtzidis authored
Introduce OwnsRemappedFileBuffers field in ASTUnit, indicating whether the ASTUnit should delete the remapped buffers. llvm-svn: 127051
-
Douglas Gregor authored
When diagnostics are suppressed (e.g., because of code completion), don't trigger the ExprTemplates.empty() check at the end of a function body llvm-svn: 127046
-
- Mar 04, 2011
-
-
Douglas Gregor authored
llvm-svn: 127042
-
Douglas Gregor authored
too. Fixes PR7900. While I'm in this area, improve the diagnostic when the type being destroyed doesn't match either of the types we found. llvm-svn: 127041
-
Bill Wendling authored
llvm-svn: 127039
-
Douglas Gregor authored
to cope with non-type templates by providing appropriate errors. Previously, we would either assert, crash, or silently build a dependent type when we shouldn't. Fixes PR9226. llvm-svn: 127037
-
Douglas Gregor authored
to find the instantiated declaration within a template instantiation fails to do so. It's likely that the original instantiation got dropped due to instantiation failures, which doesn't actually break the invariants of the AST. This eliminates a number of crash-on-invalid failures, e.g., PR9300. llvm-svn: 127030
-
Douglas Gregor authored
properly cope with NULL return values. llvm-svn: 127024
-
Devang Patel authored
Emit a stop point before a call expression so that debugger has some chance of getting some footing when user wants to stop at 2nd bar() in following expression when all function calls are inlined. = bar() + ... + bar() + ... clang keeps track of column numbers, so we could put location entries for all subexpressions but that will significantly bloat debug info in general, but a location for call expression is helpful here. llvm-svn: 127018
-
Douglas Gregor authored
DependentTemplateSpecializationType during tree transformation, retain the NestedNameSpecifierLoc as it was used to translate the template name, rather than reconstructing it from the template name. Fixes PR9401. llvm-svn: 127015
-
Douglas Gregor authored
capture the template parameters of template template parameters. llvm-svn: 127012
-
Douglas Gregor authored
DeclContext once we've created it. This mirrors what we do for function parameters, where the parameters start out with translation-unit context and then are adopted by the appropriate DeclContext when it is created. Also give template parameters public access and make sure that they don't show up for the purposes of name lookup. Fixes PR9400, a regression introduced by r126920, which implemented substitution of default template arguments provided in template template parameters (C++ core issue 150). How on earth could the DeclContext of a template parameter affect the handling of default template arguments? I'm so glad you asked! The link is Sema::getTemplateInstantiationArgs(), which determines the outer template argument lists that correspond to a given declaration. When we're instantiating a default template argument for a template template parameter within the body of a template definition (not it's instantiation, per core issue 150), we weren't getting any outer template arguments because the context of the template template parameter was the translation unit. Now that the context of the template template parameter is its owning template, we get the template arguments from the injected-class-name of the owning template, so substitution works as it should. llvm-svn: 127004
-
Abramo Bagnara authored
template <class T> void foo(); template <> void foo<int>(); /* Spec 1 */ template <> void foo<int>(); /* Spec 2 */ If we look at the main location of the first explicit specialization (Spec 1) it can be seen that it points to the name of the *second* explicit specialization (Spec 2), which is a redeclaration of Spec1. Hence, the source range obtained for Spec1 is not only inaccurate, but also invalid (the end location comes before the start location). llvm-svn: 127002
-
Abramo Bagnara authored
llvm-svn: 126999
-
Benjamin Kramer authored
llvm-svn: 126997
-
Abramo Bagnara authored
llvm-svn: 126996
-
Abramo Bagnara authored
llvm-svn: 126994
-
John McCall authored
computing for a nested decl with explicit visibility. This is all part of the general philosophy of explicit visibility attributes, where any information that was obviously available at the attribute site should probably be ignored. Fixes PR9371. llvm-svn: 126992
-
John McCall authored
this can have any optimization effect, given the opacity of objects pointers, but you never know. llvm-svn: 126990
-
John McCall authored
llvm-svn: 126989
-
John McCall authored
bugs with such types. Not sure this is quite how I want the desugaring and a.k.a. logic to go, but it suffices. llvm-svn: 126986
-
Ted Kremenek authored
Correctly handle nested switch statements in CFGBuilder when on switch statement has a condition that evaluates to a constant. llvm-svn: 126977
-
- Mar 03, 2011
-
-
rdar://9083431Argyrios Kyrtzidis authored
-Woverloaded-virtual shouldn't warn for static functions. Fixes rdar://9083431 & http://llvm.org/PR9396. llvm-svn: 126966
-
Douglas Gregor authored
1) When we do an instantiation of the injected-class-name type, provide a proper source location. This is just plain good hygiene. 2) When we're building a NestedNameSpecifierLoc from a CXXScopeSpec, only return an empty NestedNameSpecifierLoc if there's no representation. Both problems contributed to the horrible test case in PR9390 that I couldn't reduce down to something palatable. llvm-svn: 126961
-
Devang Patel authored
This fixes few blocks.exp regressions. llvm-svn: 126960
-
Abramo Bagnara authored
llvm-svn: 126952
-
-
Douglas Gregor authored
TemplateSpecializationTypes, which also fixes PR9388. llvm-svn: 126946
-
Abramo Bagnara authored
llvm-svn: 126945
-
Abramo Bagnara authored
llvm-svn: 126943
-
Abramo Bagnara authored
llvm-svn: 126939
-
Douglas Gregor authored
parameter, save the instantiated default template arguments along with the explicitly-specified template argument list. That way, we prefer the default template template arguments corresponding to the template template parameter rather than those of its template template argument. This addresses the likely direction of C++ core issue 150, and fixes PR9353/<rdar://problem/9069136>, bringing us closer to the behavior of EDG and GCC. llvm-svn: 126920
-
Douglas Gregor authored
llvm-svn: 126919
-
Ted Kremenek authored
llvm-svn: 126910
-
Ted Kremenek authored
llvm-svn: 126909
-
Matt Beaumont-Gay authored
llvm-svn: 126907
-
Matt Beaumont-Gay authored
llvm-svn: 126897
-