summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
Commit message (Collapse)AuthorAgeFilesLines
...
* Ignore attributes on classes when calculating visibility for membersJohn McCall2010-11-021-49/+65
| | | | | | | with their own explicit visibility attributes. Basically we only want to apply a single visibility attribute from any particular ancestry. llvm-svn: 117998
* Restore patch for PR8453 which was undone in r117829Fariborz Jahanian2010-11-011-20/+33
| | | | | | (was project bugs). llvm-svn: 117951
* Emit error when using a bound member function for something other than ↵Argyrios Kyrtzidis2010-11-011-0/+6
| | | | | | | | calling it. Also avoids IRGen crashes due to accepting invalid code. llvm-svn: 117943
* Don't update empty field subobjects for bitfields. Fixes PR8519.Anders Carlsson2010-11-011-1/+3
| | | | llvm-svn: 117921
* Only apply -fvisibility-inlines-hidden to definitions. ApparentlyJohn McCall2010-11-011-3/+9
| | | | | | | | isInlined() just gives meaningless results for non-definitions. Fixes rdar://problem/8614470 llvm-svn: 117887
* Get rid of more calls to getBaseClassOffsetInBits.Anders Carlsson2010-11-011-10/+5
| | | | llvm-svn: 117883
* Port over a couple of getVBaseClassOffsetInBits call sites to use ↵Anders Carlsson2010-10-312-19/+19
| | | | | | getVBaseClassOffset instead. llvm-svn: 117882
* Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a ↵Anders Carlsson2010-10-313-13/+13
| | | | | | getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset. llvm-svn: 117881
* Start converting over the RecordLayoutBuilder next.Anders Carlsson2010-10-311-20/+15
| | | | llvm-svn: 117878
* EmptyObjectMap now uses CharUnits wherever possible.Anders Carlsson2010-10-312-62/+62
| | | | llvm-svn: 117877
* More CharUnits conversion.Anders Carlsson2010-10-311-22/+44
| | | | llvm-svn: 117875
* More CharUnits conversion.Anders Carlsson2010-10-311-21/+28
| | | | llvm-svn: 117874
* Use CharUnits in the EmptyClassOffsets map.Anders Carlsson2010-10-311-3/+12
| | | | llvm-svn: 117873
* Baby steps towards using only CharUnits for base class offsets in ↵Anders Carlsson2010-10-311-4/+10
| | | | | | ASTRecordLayout. Start by storing the offsets in CharUnits in the ASTRecordLayout object. llvm-svn: 117869
* Teach the constant expr evaluator about derived-to-base casts when no ↵Anders Carlsson2010-10-311-0/+36
| | | | | | virtual bases are involved. Fixes PR5974. llvm-svn: 117868
* Don't try to evaluate the LHS or RHS of a member pointer binary operation. ↵Anders Carlsson2010-10-311-0/+4
| | | | | | Fixes PR8507. llvm-svn: 117850
* Emit an error when trying to form a pointer-to-member to a bitfield.Argyrios Kyrtzidis2010-10-301-0/+5
| | | | | | As a bonus, avoids a crash on the IRGen side due to accepting invalid code. llvm-svn: 117842
* Revert r117678, "Qualified 'id' should implement all of static class ↵Daniel Dunbar2010-10-301-33/+20
| | | | | | type's", it breaks things. llvm-svn: 117829
* Better solution: calculate the visibility of functions and variablesJohn McCall2010-10-302-166/+111
| | | | | | | | | | independently of whether they're definitions, then teach IR generation to ignore non-explicit visibility when emitting declarations. Use this to make sure that RTTI, vtables, and VTTs get the right visibility. More of rdar://problem/8613093 llvm-svn: 117781
* GCC faithfully calculates visibility for variables independently ofJohn McCall2010-10-301-23/+19
| | | | | | | | whether it's a declaration or not, then ignores that information for declarations unless it was explicitly given. It's not totally clear how that should be mapped into a sane system, but make an effort. llvm-svn: 117780
* Rename alignof -> alignOf to avoid irritating C++'0x compilers,Chris Lattner2010-10-305-17/+17
| | | | | | PR8423 llvm-svn: 117775
* Make the deserialization of C++ base class specifiers lazy, improvingDouglas Gregor2010-10-291-5/+5
| | | | | | the performance of C++ PCH and reducing stack depth in the reader. llvm-svn: 117732
* Restore r117644, this time properly ignoring -fvisibility and type visibilityJohn McCall2010-10-291-48/+133
| | | | | | | | | | | | | | | for namespace-scope variable declarations. Apply visibility in IR gen to variables that are merely declared and never defined. We were previously emitting these with default visibility unless they were declared with private_extern. Ignore global visibility settings when computing visibility for a declaration's context, and key several conditions on whether a visibility attribute exists anywhere in the hierarchy as opposed to whether it exists at the current level. llvm-svn: 117729
* Qualified 'id' should implement all of static class type'sFariborz Jahanian2010-10-291-20/+33
| | | | | | | | protocols, including those added to class, super class and categories; otherewise issue a warning. This fixes pr8453. llvm-svn: 117678
* Revert r117644, "Apply visibility in IR gen to variables that are merelyDaniel Dunbar2010-10-291-112/+45
| | | | | | declared", it breaks things. llvm-svn: 117653
* Apply visibility in IR gen to variables that are merely declaredJohn McCall2010-10-291-45/+112
| | | | | | | | | | | | and never defined. We were previously emitting these with default visibility unless they were declared with private_extern. Ignore global visibility settings when computing visibility for a declaration's context, and key several conditions on whether a visibility attribute exists anywhere in the hierarchy as opposed to whether it exists at the current level. llvm-svn: 117644
* Add a hook to the CXXABI object to get the default method calling convention.Charles Davis2010-10-293-0/+17
| | | | | | | This isn't used yet, because someone more experienced than I needs to look at the type system about gutting getCanonicalCallConv(). llvm-svn: 117638
* When computing the visibility of a class member, calculate the visibilityJohn McCall2010-10-291-17/+31
| | | | | | | of its context without considering global settings like -fvisibility=hidden. Fixes PR8492. llvm-svn: 117628
* Don't apply -fvisibility-inlines-hidden to extern templates.John McCall2010-10-281-1/+3
| | | | | | Part 2 of rdar://problem/8595231 llvm-svn: 117567
* Initialize the ASTMutationListener. Thanks goes to Abramo Bagnara!Argyrios Kyrtzidis2010-10-281-1/+1
| | | | llvm-svn: 117541
* Implement an indirect-goto optimization for goto *&&lbl and respect thisJohn McCall2010-10-281-2/+6
| | | | | | | | | | | | | | in the scope checker. With that done, turn an indirect goto into a protected scope into a hard error; otherwise IR generation has to start worrying about declarations not dominating their scopes, as exemplified in PR8473. If this really affects anyone, I can probably adjust this to only hard-error on possible indirect gotos into VLA scopes rather than arbitrary scopes. But we'll see how people cope with the aggressive change on the marginal feature. llvm-svn: 117539
* Use the ASTMutationListener to track when a named decl gets added to a ↵Argyrios Kyrtzidis2010-10-281-0/+7
| | | | | | | | DeclContext, meaning we need to rewrite its name lookup table in a chained PCH. llvm-svn: 117536
* Use the ASTMutationListener to track added template specializations in a ↵Argyrios Kyrtzidis2010-10-281-0/+16
| | | | | | chained PCH. llvm-svn: 117533
* Abandon the type-visibility optimization for functions. GCC doesn't do it,John McCall2010-10-281-13/+8
| | | | | | and it's too much trouble to push for. Fixes PR8478. llvm-svn: 117532
* When computing visibility, use the latest declaration's explicit visibilityJohn McCall2010-10-281-8/+26
| | | | | | | | attribute. Part of rdar://problem/8595231 llvm-svn: 117526
* Don't override explicit visibility attributes on class members withJohn McCall2010-10-271-2/+3
| | | | | | type-based visibility. llvm-svn: 117500
* Make AST deserialization for class template specializations lazier, byDouglas Gregor2010-10-271-0/+23
| | | | | | | not loading the specializations of a class template until some AST consumer needs them. llvm-svn: 117498
* Lazily load the "next" namespace in the chain of NamespaceDecls, toDouglas Gregor2010-10-271-0/+5
| | | | | | eliminate some excessive recursion and deserialization. llvm-svn: 117476
* Add helper for extracting the CXXRecordDecl for the implicit argument toChandler Carruth2010-10-271-0/+11
| | | | | | | a member call expression. This has proved to be a common pattern for users of RecursiveASTVisitor. llvm-svn: 117439
* Optimize field space usage in CompoundStmt, LabelStmt, Expr, and CastExpr.John McCall2010-10-262-20/+22
| | | | | | | | | There's probably still significant padding waste on x86-64 UNIXen, but the difference in 32-bit compiles should be significant. There are a lot of Expr nodes left that could lose a word this way. llvm-svn: 117359
* No really, we don't have a retain/release system for statements/expressionsJohn McCall2010-10-261-13/+6
| | | | | | anymore. llvm-svn: 117357
* A couple of tweaks to the visibility rules: John McCall2010-10-262-3/+22
| | | | | | | | | | | - tags with C linkage should ignore visibility=hidden - functions and variables with explicit visibility attributes should ignore the linkage of their types Either of these should be sufficient to fix PR8457. Also, FileCheck-ize a test case. llvm-svn: 117351
* When de-serializing a type that is supposed to be canonical, callDouglas Gregor2010-10-261-22/+23
| | | | | | | | | | | | | getCanonicalType() to make sure that the type we got back is actually canonical. This is the case for most types, which always build a canonical type when given canonical components. However, some types that involve expressions in their canonicalization (e.g., array types with dependent sizes) don't always build canonical types from canonical components, because there is no such thing as a "canonical" expression. Therefore, we do this extra mapping to ensure that the canonical types we store are actually canonical. llvm-svn: 117344
* Improve the tracking of source locations for parentheses in constructor calls.Chandler Carruth2010-10-251-21/+21
| | | | | | | | | | | | This adds them where missing, and traces them through PCH. We fix at least one bug in the extents found by the Index library, and make a lot of refactoring tools which care about the exact formulation of a constructor call easier to write. Also some minor cleanups to more consistently follow the friend pattern instead of the setter pattern when rebuilding a serialized AST. Patch originally by Samuel Benzaquen. llvm-svn: 117254
* Implement GNU C extension: two types are compatible if they appearPeter Collingbourne2010-10-241-2/+46
| | | | | | | as a function argument, one of the types is a transparent union type and the other type is compatible with a union member llvm-svn: 117243
* Keep track in chained PCH of implicit members that were added after the ↵Argyrios Kyrtzidis2010-10-241-6/+5
| | | | | | definition was completed. llvm-svn: 117240
* Start fleshing out ASTMutationListener; notify when a tag definition is ↵Argyrios Kyrtzidis2010-10-241-0/+4
| | | | | | | | | completed. In that case a chained PCH will record the updates to the DefinitionData pointer of forward references. If a forward reference mutated into a definition re-write it into the chained PCH, this is too big of a change. llvm-svn: 117239
* Put the mechanism in place to track modifications in an AST entity that were ↵Argyrios Kyrtzidis2010-10-243-0/+8
| | | | | | | | | | | | committed after its initial creation/deserialization and store the changes in a chained PCH. The idea is that the AST entities call methods on the ASTMutationListener to give notifications of changes; the PCHWriter implements the ASTMutationListener interface and stores the incremental changes of the updated entity. WIP llvm-svn: 117235
* Update to use 'LLVM_*' macro names for attributes.Chandler Carruth2010-10-231-2/+2
| | | | llvm-svn: 117201
* Substantially revise how clang computes the visibility of a declaration toJohn McCall2010-10-222-194/+357
| | | | | | | | more closely parallel the computation of linkage. This gets us to a state much closer to what gcc emits, modulo bugs, which will undoubtedly arise in abundance. llvm-svn: 117147
OpenPOWER on IntegriCloud