summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Propagate new-style exception spec information to Declarator.Sebastian Redl2011-03-055-47/+60
| | | | llvm-svn: 127111
* When substituting in for a template name, do not produce a qualifiedDouglas Gregor2011-03-051-0/+7
| | | | | | | | | | | template name as the result of substitution. The qualifier is handled separately by the tree transformer, so we would end up in an inconsistent state. This is actually the last bit of PR9016, and possibly also fixes PR8965. It takes Boost.Icl from "epic fail" down to a single failure. llvm-svn: 127108
* Fixed LabelDecl source range and cleaned creation code.Abramo Bagnara2011-03-055-21/+31
| | | | llvm-svn: 127094
* When determining template instantiation arguments within a functionDouglas Gregor2011-03-052-38/+65
| | | | | | | | | | | template (not a specialization!), use the "injected" function template arguments, which correspond to the template parameters of the function template. This is required when substituting into the default template parameters of template template parameters within a function template. Fixes PR9016. llvm-svn: 127092
* When transforming a substituted template type parameter, try toDouglas Gregor2011-03-051-1/+22
| | | | | | | | | | | | | | | transform the type that replaces the template type parameter. In the vast majority of cases, there's nothing to do, because most template type parameters are replaced with something non-dependent that doesn't need further transformation. However, when we're dealing with the default template arguments of template template parameters, we might end up replacing a template parameter (of the template template parameter) with a template parameter of the enclosing template. This addresses part of PR9016, but not within function templates. That's a separate issue. llvm-svn: 127091
* Normalize target triple passed out of driver. Basically this meansAnton Korobeynikov2011-03-051-1/+1
| | | | | | | | that at cc1 level we will always have normalized triple and thus can provide necessary default based on e.g. environment value (e.g. for "arm-eabi" triple, etc.) llvm-svn: 127087
* Parser support for noexcept specifications.Sebastian Redl2011-03-052-57/+129
| | | | llvm-svn: 127086
* Improved MemberPointerType source locations.Abramo Bagnara2011-03-054-12/+68
| | | | llvm-svn: 127085
* StringRefify.Benjamin Kramer2011-03-052-9/+10
| | | | llvm-svn: 127082
* Much to my surprise, OverloadExprs can also point to function template decls.Matt Beaumont-Gay2011-03-051-9/+12
| | | | llvm-svn: 127061
* When we're deserializing a template parameter declaration, temporarilyDouglas Gregor2011-03-052-5/+24
| | | | | | | | | | 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
* Currently we can only remap a file by creating a MemoryBuffer and replacing ↵Argyrios Kyrtzidis2011-03-055-51/+124
| | | | | | | | | 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
* Introduce OwnsRemappedFileBuffers field in ASTUnit, indicating whether the ↵Argyrios Kyrtzidis2011-03-051-1/+2
| | | | | | ASTUnit should delete the remapped buffers. llvm-svn: 127051
* When diagnostics are suppressed (e.g., because of code completion), don't ↵Douglas Gregor2011-03-041-1/+2
| | | | | | trigger the ExprTemplates.empty() check at the end of a function body llvm-svn: 127046
* Diagnose destructor templates. Fixes PR7904.Douglas Gregor2011-03-041-1/+8
| | | | llvm-svn: 127042
* When clearing a LookupResult structure, clear out the naming class,Douglas Gregor2011-03-041-3/+13
| | | | | | | | | 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
* Initialize variable.Bill Wendling2011-03-041-2/+2
| | | | llvm-svn: 127039
* Teach Sema::ActOnCXXNestedNameSpecifier and Sema::CheckTemplateIdTypeDouglas Gregor2011-03-044-38/+78
| | | | | | | | 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
* After an error of any kind has occurred, don't assert when attemptingDouglas Gregor2011-03-041-3/+5
| | | | | | | | | | 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
* Patch up several Sema::FindInstantiatedDecl() callers, so that they'llDouglas Gregor2011-03-041-8/+30
| | | | | | properly cope with NULL return values. llvm-svn: 127024
* Emit a stop point before a call expression so that debugger has some chance ↵Devang Patel2011-03-041-0/+7
| | | | | | | | | | 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
* When constructing source-location information for aDouglas Gregor2011-03-041-6/+8
| | | | | | | | | | 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
* *Recursively* set the context of a template parameter, so that we alsoDouglas Gregor2011-03-041-17/+15
| | | | | | capture the template parameters of template template parameters. llvm-svn: 127012
* Make sure to put template parameters into their owning template'sDouglas Gregor2011-03-045-10/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fixed source range for function template specializations.Abramo Bagnara2011-03-041-5/+11
| | | | | | | | | | | 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
* Fixed source range for ClassTemplateSpecializationDecl.Abramo Bagnara2011-03-041-0/+13
| | | | llvm-svn: 126999
* Move private structs into anonymous namespaces.Benjamin Kramer2011-03-042-23/+25
| | | | llvm-svn: 126997
* Improved TemplateTypeParmDecl end location.Abramo Bagnara2011-03-041-1/+11
| | | | llvm-svn: 126996
* Fixed end location of NonTypeTemplateParamDecl.Abramo Bagnara2011-03-041-1/+4
| | | | llvm-svn: 126994
* Don't consider visibility from template parameter lists if we'reJohn McCall2011-03-041-5/+12
| | | | | | | | | 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
* Access ivars with inbounds GEPs, even in -fwrapv. It's unlikely thatJohn McCall2011-03-041-1/+1
| | | | | | | this can have any optimization effect, given the opacity of objects pointers, but you never know. llvm-svn: 126990
* Let's do super message sends with static allocas instead of dynamic ones.John McCall2011-03-041-2/+2
| | | | llvm-svn: 126989
* Make AttributedTypes for GC-qualified types and fix some miscellaneousJohn McCall2011-03-044-10/+89
| | | | | | | 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
* Correctly handle nested switch statements in CFGBuilder when on switch ↵Ted Kremenek2011-03-041-11/+12
| | | | | | statement has a condition that evaluates to a constant. llvm-svn: 126977
* -Woverloaded-virtual shouldn't warn for static functions. Fixes ↵Argyrios Kyrtzidis2011-03-031-1/+2
| | | | | | rdar://9083431 & http://llvm.org/PR9396. llvm-svn: 126966
* Fix PR9390 in not one, but two ways:Douglas Gregor2011-03-032-2/+2
| | | | | | | | | | | | | | 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
* Encode argument numbering in debug info so that code generator can emit them ↵Devang Patel2011-03-035-20/+27
| | | | | | | | in order. This fixes few blocks.exp regressions. llvm-svn: 126960
* Fixed source range for LabelDecl.Abramo Bagnara2011-03-035-6/+9
| | | | llvm-svn: 126952
* Don't emit unused warning for deleted functions. Fixes rdar://8365684 & ↵Argyrios Kyrtzidis2011-03-031-0/+2
| | | | | | http://llvm.org/PR9391. llvm-svn: 126950
* Eliminate redundant nested-name-specifiers onDouglas Gregor2011-03-031-0/+8
| | | | | | TemplateSpecializationTypes, which also fixes PR9388. llvm-svn: 126946
* Removed left brace location from LinkageSpecDecl.Abramo Bagnara2011-03-034-7/+3
| | | | llvm-svn: 126945
* Fixed end source location for LinkageSpecDecl.Abramo Bagnara2011-03-034-11/+18
| | | | llvm-svn: 126943
* Fixed source range for FileScopeAsmDecl. Others source range fixes will follow.Abramo Bagnara2011-03-035-8/+17
| | | | llvm-svn: 126939
* When we use the default template arguments of a template templateDouglas Gregor2011-03-034-15/+22
| | | | | | | | | | | | | 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
* Add a missing break, from John WiegleyDouglas Gregor2011-03-031-0/+1
| | | | llvm-svn: 126919
* Teach CFGImplicitDtor::getDestructorDecl() about arrays of objects with ↵Ted Kremenek2011-03-032-4/+8
| | | | | | destructors. llvm-svn: 126910
* Teach CFGImplicitDtor::getDestructorDecl() about reference types.Ted Kremenek2011-03-031-2/+3
| | | | llvm-svn: 126909
* Let's go with John and Ted's preferred fix.Matt Beaumont-Gay2011-03-031-1/+2
| | | | llvm-svn: 126907
* Keep GCC from complaining about falling off the end of the function.Matt Beaumont-Gay2011-03-021-0/+1
| | | | llvm-svn: 126897
* Fix a typo.Dan Gohman2011-03-021-1/+1
| | | | llvm-svn: 126890
OpenPOWER on IntegriCloud