summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Add some tests for reference-collapsing and referencing bindingDouglas Gregor2011-01-204-11/+14
| | | | | | | | | involving rvalue references, to start scoping out what is and what isn't implemented. In the process, tweak some standards citations, type desugaring, and teach the tentative parser about && in ptr-operator. llvm-svn: 123913
* Fix the computation of alignment for fields of packed+aligned structs.John McCall2011-01-203-14/+48
| | | | | | Part of the fix for PR8413. llvm-svn: 123904
* When instantiating member functions, propagate whether the member function ↵Anders Carlsson2011-01-201-0/+4
| | | | | | | | is marked 'final' and 'override'. Also, call CheckOverrideControl when instantiating member functions. llvm-svn: 123900
* When checking for functions marked override, ignore dependent contexts.Anders Carlsson2011-01-201-0/+3
| | | | llvm-svn: 123894
* Make CheckOverrideControl a member of Sema.Anders Carlsson2011-01-201-4/+3
| | | | llvm-svn: 123893
* Diagnose virtual member functions marked override but not overriding any ↵Anders Carlsson2011-01-202-3/+30
| | | | | | virtual member functions. llvm-svn: 123888
* Add IsMarkedOverride and IsMarkedFinal flags to FunctionDecl (to be used by ↵Anders Carlsson2011-01-202-0/+5
| | | | | | CXXRecordDecl). llvm-svn: 123885
* Only allow virtual member functions to be marked 'override' and 'final'.Anders Carlsson2011-01-201-0/+16
| | | | llvm-svn: 123882
* Pass the VirtSpecifiers along to Sema::ActOnCXXMemberDeclarator.Anders Carlsson2011-01-203-3/+5
| | | | llvm-svn: 123878
* Lazily initialize the 'final' and 'override' contextual keywords as ↵Anders Carlsson2011-01-202-5/+8
| | | | | | suggested by Doug. llvm-svn: 123876
* Fix PR8884 by skipping transparent contexts. The test is for LikageSpec. IRafael Espindola2011-01-201-1/+1
| | | | | | | failed to find a case where an enum context would make a difference, but found PR9007 on the way. llvm-svn: 123871
* Add CharUnits::RoundUpToAlignment() to simplify rounding in character units.Ken Dyck2011-01-201-5/+2
| | | | llvm-svn: 123868
* When building a user-defined conversion sequence, keep track of theDouglas Gregor2011-01-202-3/+9
| | | | | | | declaration that name lookup actually found, so that we can use it for access checking later on. Fixes <rdar://problem/8876150>. llvm-svn: 123867
* Sema::BuildCXXMemberCallExpr() can fail due to access or ambiguities,Douglas Gregor2011-01-203-14/+24
| | | | | | | so allow it to propagate the failure outward. Fixes the crashing part of <rdar://problem/8876150>. llvm-svn: 123863
* Explicitly track the number of call arguments provided when performingDouglas Gregor2011-01-191-4/+13
| | | | | | | overload resolution, so that we only use that number of call arguments for partial ordering. Fixes PR9006, a recent regression. llvm-svn: 123861
* Eradicate any mention of C++0x concepts.Douglas Gregor2011-01-191-1/+0
| | | | llvm-svn: 123860
* Variadic templates are fully implemented.Douglas Gregor2011-01-191-1/+1
| | | | | | | | Turn on the __has_feature switch for variadic templates, document their completion, and put the ExtWarn into the c++0x-extensions warning group. llvm-svn: 123854
* Downgrade the "variadic templates are a C++0x feature" error to anDouglas Gregor2011-01-192-3/+3
| | | | | | | | ExtWarn. We want variadic templates to be usable in libc++/libstdc++ headers even when we're in C++98/03 mode, since it's the only clean way to implement TR1 <functional>. llvm-svn: 123852
* Refactor the dependence computation for DeclRefExpr so that we canDouglas Gregor2011-01-191-38/+68
| | | | | | | reuse it for BlockDeclRefExpr. Do so, fixing the dependence calculate for BlockDeclRefExpr. llvm-svn: 123851
* Implement basic support for the use of variadic templates and blocksDouglas Gregor2011-01-193-12/+49
| | | | | | | | | | | | | | | | | together. In particular: - Handle the use of captured parameter pack names within blocks (BlockDeclRefExpr understands parameter packs now) - Handle the declaration and expansion of parameter packs within a block's parameter list, e.g., ^(Args ...args) { ... }) - Handle instantiation of blocks where the return type was not explicitly specified. (unrelated, but necessary for my tests). Together, these fixes should make blocks and variadic templates work reasonably well together. Note that BlockDeclRefExpr is still broken w.r.t. its computation of type and value dependence, which will still cause problems for blocks in templates. llvm-svn: 123849
* Implement support for non-type template parameter packs whose type isDouglas Gregor2011-01-1911-75/+377
| | | | | | | | | | | | | | | | | | | | | a pack expansion, e.g., the parameter pack Values in: template<typename ...Types> struct Outer { template<Types ...Values> struct Inner; }; This new implementation approach introduces the notion of an "expanded" non-type template parameter pack, for which we have already expanded the types of the parameter pack (to, say, "int*, float*", for Outer<int*, float*>) but have not yet expanded the values. Aside from creating these expanded non-type template parameter packs, this patch updates template argument checking and non-type template parameter pack instantiation to make use of the appropriate types in the parameter pack. llvm-svn: 123845
* NonTypeTemplateParmDecls always have TypeSourceInfo. There's no senseDouglas Gregor2011-01-191-10/+4
| | | | | | in pretending otherwise. llvm-svn: 123839
* Warn about the use of unparenthesized |= in conditionals (which may beDouglas Gregor2011-01-191-5/+15
| | | | | | a typo for !=). Fixes PR9001, from Hans Wennborg! llvm-svn: 123836
* Parse the optional semicolon after a C++ in-class member functionDouglas Gregor2011-01-191-0/+12
| | | | | | | definition, rather than complaining about it. Problem reported by Marshall Clow. llvm-svn: 123835
* When building the copy expression for a __block variable, make sureJohn McCall2011-01-192-57/+51
| | | | | | | there's a respectable point of instantiation. Also, make sure we do this operation even when instantiating a dependently-typed variable. llvm-svn: 123818
* Change the canonical representation of array types to store qualifiers on theJohn McCall2011-01-194-206/+193
| | | | | | | | | | | | outermost array types and not on the element type. Move the CanonicalType member from Type to ExtQualsTypeCommonBase; the canonical type on an ExtQuals node includes the qualifiers on the ExtQuals. Assorted optimizations enabled by this change. getQualifiers(), hasQualifiers(), etc. should all now implicitly look through array types. llvm-svn: 123817
* Change QualType::getTypePtr() to return a const pointer, then change aJohn McCall2011-01-1937-180/+183
| | | | | | thousand other things which were (generally inadvertantly) relying on that. llvm-svn: 123814
* Replace calls to getTypeSize() and getTypeAlign() with their 'InChars' Ken Dyck2011-01-195-12/+17
| | | | | | counterparts where char units are needed. llvm-svn: 123805
* Emit DW_TAG_lexical_scope to surround foreach.Devang Patel2011-01-191-0/+12
| | | | llvm-svn: 123802
* Don't silently drop warning flags passed in toDouglas Gregor2011-01-191-5/+9
| | | | | | clang_createTranslationUnitFromSourceFile(). llvm-svn: 123793
* lib/Sema/SemaExpr.cpp: __null should be LongLongTy on LLP64 Win64.NAKAMURA Takumi2011-01-191-2/+9
| | | | llvm-svn: 123791
* lib/CodeGen/TargetInfo.cpp: Fix coding style and erase an obsolete comment.NAKAMURA Takumi2011-01-191-6/+4
| | | | llvm-svn: 123790
* Teach UninitializedValuesV2 to implicitly reason about C++Ted Kremenek2011-01-182-19/+67
| | | | | | | | references by monitoring whether an access to a variable is solely to compute it's lvalue or to do an lvalue-to-rvalue conversion (i.e., a load). llvm-svn: 123777
* Add unnamed_addr in CreateRuntimeVariable.Rafael Espindola2011-01-182-3/+9
| | | | llvm-svn: 123773
* When redefining a macro don't warn twice if it's not used and don't warn for ↵Argyrios Kyrtzidis2011-01-181-1/+3
| | | | | | | | duplicate definition by command line options. Fixes rdar://8875916. llvm-svn: 123767
* Properly do a float -> _Complex double conversion, fixes rdar://8875946.Argyrios Kyrtzidis2011-01-181-1/+2
| | | | llvm-svn: 123759
* Fix some unnecessarily complicated code for canonicalizing variably-modifiedJohn McCall2011-01-181-43/+119
| | | | | | parameter types. llvm-svn: 123753
* Generalize some operations on qualifiers. QualType::getQualifiers() andJohn McCall2011-01-183-52/+75
| | | | | | | ::getCVRQualifiers() now look through array types, like all the other standard queries. Also, make a 'split' variant of getUnqualifiedType(). llvm-svn: 123751
* Add support for explicit constructor calls in Microsoft mode.Francois Pichet2011-01-184-15/+49
| | | | | | | | | | | | | | | | | | | For example: class A{ public: A& operator=(const A& that) { if (this != &that) { this->A::~A(); this->A::A(that); // <=== explicit constructor call. } return *this; } }; More work will be needed to support an explicit call to a template constructor. llvm-svn: 123735
* Correctly enable test/Sema/unit-variables.c,Ted Kremenek2011-01-181-1/+3
| | | | | | | thus identifying a minor logical flaw in UninitializedValuesV2.cpp. llvm-svn: 123734
* Teach UninitializedValuesV2 about "int x = x" andTed Kremenek2011-01-181-8/+14
| | | | | | also properly handle confluence of loops. llvm-svn: 123733
* Introduce the notion of a "minimal" import of ASTs, to better support LLDB.Douglas Gregor2011-01-182-5/+28
| | | | llvm-svn: 123723
* Replace calls to CharUnits::fromQuantity() with ones to Ken Dyck2011-01-182-4/+4
| | | | | | ASTContext::toCharUnitsFromBits() when converting from bit sizes to char units. llvm-svn: 123720
* Fix warnings found by gcc-4.6, from -Wunused-but-set-variable andJeffrey Yasskin2011-01-1823-57/+17
| | | | | | -Wint-to-pointer-cast. llvm-svn: 123719
* Replace calls to CharUnits::fromQuantity() with onesKen Dyck2011-01-182-17/+11
| | | | | | ASTContext::toCharUnitsFromBits() when converting from bit sizes to char units. llvm-svn: 123715
* lib/CodeGen/TargetInfo.cpp: Add Win64 calling conversion.NAKAMURA Takumi2011-01-171-2/+49
| | | | | | | FIXME: It would be incompatible to Microsoft's in one point. On mingw64-gcc, {i128} is expanded for args and returned as {rax, rdx}. llvm-svn: 123692
* lib/Basic/Targets.cpp: __builtin_va_list is as same on win64 mingw64!NAKAMURA Takumi2011-01-171-3/+3
| | | | llvm-svn: 123691
* lib/Basic/Targets.cpp: Fix __declspec() on Mingw-w64.NAKAMURA Takumi2011-01-171-1/+1
| | | | | | It should be defined as-is. Some headers would detect existence of __declspec and use one. llvm-svn: 123690
* lib/Basic/Targets.cpp: Set user_label_prefix on Win64 both mingw and msvc.NAKAMURA Takumi2011-01-171-0/+1
| | | | llvm-svn: 123689
* Simplify.Devang Patel2011-01-172-19/+12
| | | | llvm-svn: 123682
OpenPOWER on IntegriCloud