summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Add a CastInfo struct that will be used for cast information when ↵Anders Carlsson2009-08-104-15/+25
| | | | | | constructing cast expressions. Right now it only stores the cast kind, but in the future it might store conversion functions and constructors. llvm-svn: 78599
* fix a couple of problems with section attributes:Chris Lattner2009-08-109-17/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Passing something that isn't a string used to cause: "argument to annotate attribute was not a string literal" make it say "section attribute" instead. 2. Fix the location of the above message to point to the bad argument instead of the section token. 3. Implement rdar://4341926, by diagnosing invalid section specifiers in the frontend rather than letting them slip all the way to the assembler (a QoI win). An example of #3 is that we used to produce something like this: /var/folders/n7/n7Yno9ihEm894640nJdSQU+++TI/-Tmp-//ccFPFGtT.s:2:Expected comma after segment-name /var/folders/n7/n7Yno9ihEm894640nJdSQU+++TI/-Tmp-//ccFPFGtT.s:2:Rest of line ignored. 1st junk character valued 46 (.). Daniel improved clang to use llvm_report_error, so now we got: $ clang t.c -c fatal error: error in backend: Global variable 'x' has an invalid section specifier 'sadf': mach-o section specifier requires a segment and section separated by a comma. with no loc info. Now we get: $ clang t.c -fsyntax-only t.c:4:30: error: argument to 'section' attribute is not valid for this target: mach-o section specifier requires a segment and section separated by a comma int x __attribute__((section("sadf"))); ^ which is nice :) llvm-svn: 78586
* these tests include section specifiers that aren't valid on the Chris Lattner2009-08-102-2/+2
| | | | | | mac, use an explicit triple. llvm-svn: 78583
* minor refactoring. No change otherwise.Fariborz Jahanian2009-08-103-4/+17
| | | | llvm-svn: 78582
* ir-gen for generating copying of scalar data members inFariborz Jahanian2009-08-102-3/+16
| | | | | | a synthesized copy constructor. llvm-svn: 78580
* Add walking bases in reverse order.Mike Stump2009-08-101-0/+12
| | | | llvm-svn: 78578
* Fixed a ir-gen bug in synthesizing copy constructors.Fariborz Jahanian2009-08-102-6/+3
| | | | llvm-svn: 78570
* Use LLVM's new error handler API to report back end errors using Diagnostic.Daniel Dunbar2009-08-102-0/+16
| | | | | | | | | | | | | | | | | | | | | | For example, -- ddunbar@giles:Frontend$ clang -c backend-errors.c fatal error: error in backend: Global variable 'a' has an invalid section specifier 'I AM, not, legal': mach-o section specifier uses an unknown section type. -- compare to: -- ddunbar@giles:Frontend$ gcc -c backend-errors.c /var/folders/DQ/DQ8GT3++HESEzT1obWBynE+++TI/-Tmp-//cc45w2pq.s:2:Expected comma after segment-name /var/folders/DQ/DQ8GT3++HESEzT1obWBynE+++TI/-Tmp-//cc45w2pq.s:2:Rest of line ignored. 1st junk character valued 77 (M). -- Yay! I am not tied to my wording choice, we could also go with "uncoverable error" for the prefix, or just leave it off entirely. llvm-svn: 78554
* Revert r78535, it is causing a number of failures to build projects.Daniel Dunbar2009-08-1018-307/+31
| | | | | | | | | | | | | | | | | | | | | | | | --- Reverse-merging r78535 into '.': D test/Sema/altivec-init.c U include/clang/Basic/DiagnosticSemaKinds.td U include/clang/AST/Expr.h U include/clang/AST/StmtNodes.def U include/clang/Parse/Parser.h U include/clang/Parse/Action.h U tools/clang-cc/clang-cc.cpp U lib/Frontend/PrintParserCallbacks.cpp U lib/CodeGen/CGExprScalar.cpp U lib/Sema/SemaInit.cpp U lib/Sema/Sema.h U lib/Sema/SemaExpr.cpp U lib/Sema/SemaTemplateInstantiateExpr.cpp U lib/AST/StmtProfile.cpp U lib/AST/Expr.cpp U lib/AST/StmtPrinter.cpp U lib/Parse/ParseExpr.cpp U lib/Parse/ParseExprCXX.cpp llvm-svn: 78551
* warn, as gcc does, if __attribute__((malloc)) applied to function returning ↵Ryan Flynn2009-08-093-0/+15
| | | | | | non-pointer type llvm-svn: 78542
* map previously ignored __attribute((malloc)) to noalias attribute of llvm ↵Ryan Flynn2009-08-098-1/+41
| | | | | | function's return llvm-svn: 78541
* Improve handling of member pointers.Anders Carlsson2009-08-094-4/+56
| | | | llvm-svn: 78536
* AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d);Nate Begeman2009-08-0918-31/+307
| | | | | | | | In addition to being defined by the AltiVec PIM, this is also the vector initializer syntax used by OpenCL, so that vector literals are compatible with macro arguments. llvm-svn: 78535
* Older GCCs don't have vector::data().Benjamin Kramer2009-08-081-1/+1
| | | | llvm-svn: 78519
* ir-gen for initialization, in synthesize copy constructor, Fariborz Jahanian2009-08-083-13/+71
| | | | | | of base/field which have trivial copy constructor. llvm-svn: 78516
* Add support for global initializers.Anders Carlsson2009-08-087-4/+71
| | | | llvm-svn: 78515
* Refactor some code and implement support for global destructors for static ↵Anders Carlsson2009-08-085-17/+97
| | | | | | variables. llvm-svn: 78507
* Use CastExpr::CK_ArrayToPointerDecay and fix an assert.Anders Carlsson2009-08-082-1/+8
| | | | llvm-svn: 78502
* Add tests.Anders Carlsson2009-08-082-0/+42
| | | | llvm-svn: 78491
* Take #pragma pack into account when laying out structs. Fixes ↵Anders Carlsson2009-08-084-33/+51
| | | | | | rdar://problem/7095436. llvm-svn: 78490
* Refactoring of copy ctor ir-gen. No change in functionality.Fariborz Jahanian2009-08-083-8/+12
| | | | llvm-svn: 78489
* PR4700 - remove shift by 0 warningRyan Flynn2009-08-083-16/+9
| | | | llvm-svn: 78488
* Introduce a new PragmaPack attribute, and use it for #pragma pack. The ↵Anders Carlsson2009-08-087-29/+30
| | | | | | | | PackedAttr now only represents __attribute__((packed)). This is necessary because #pragma pack and __attribute__((packed)) have different semantics. No functionality change yet, but this lays the groundwork for fixing a record layout bug. llvm-svn: 78483
* Assert that the LLVM type has the same size as the RecordDecl size.Anders Carlsson2009-08-081-0/+3
| | | | llvm-svn: 78481
* getFunctionLevelDeclContext needs to get the previous DeclContext if ↵Anders Carlsson2009-08-082-1/+12
| | | | | | EnterDeclaratorContext has been called. Fixes PR4694. (Doug, please review) llvm-svn: 78480
* Factor some code to get the "function level" DeclContext out into a separate ↵Anders Carlsson2009-08-082-9/+12
| | | | | | function. llvm-svn: 78478
* Make sure to diagnose use of declarations in the case where we create an ↵Anders Carlsson2009-08-082-0/+18
| | | | | | implicit CXXThisExpr. llvm-svn: 78474
* Update test case; I don't really understand why packed enums changed this, butDaniel Dunbar2009-08-081-2/+1
| | | | | | the new havior is better so... llvm-svn: 78473
* Patch should implement packed enums - PR4098. Credit to Anders Johnsen.Edward O'Callaghan2009-08-086-14/+45
| | | | llvm-svn: 78471
* Get rid of Stmt::Clone now that we can reference count statements instead.Anders Carlsson2009-08-0810-131/+5
| | | | llvm-svn: 78452
* Introduce reference counting for statements and expressions, using itDouglas Gregor2009-08-087-30/+77
| | | | | | | to allow sharing of nodes. Simplifies some aspects of template instantiation, and fixes both PR3444 and <rdar://problem/6757457>. llvm-svn: 78450
* Remove use of uninitized variable.Fariborz Jahanian2009-08-082-6/+3
| | | | llvm-svn: 78448
* Synthesize copying of non-static data members withFariborz Jahanian2009-08-081-12/+32
| | | | | | non-trivial copy constructors. llvm-svn: 78445
* Synthesized copy constructor now generates code forFariborz Jahanian2009-08-073-18/+55
| | | | | | | copying non-virtual base classes which have non-trivial constructor. Work in progress. llvm-svn: 78436
* Add a CK_ArrayToPointerDecay cast kind.Anders Carlsson2009-08-073-2/+7
| | | | llvm-svn: 78434
* Add CK_ToUnion and use it for aggregate expression codegen.Anders Carlsson2009-08-073-10/+14
| | | | llvm-svn: 78429
* More CastKind work.Anders Carlsson2009-08-075-25/+30
| | | | llvm-svn: 78415
* Just add global scope to the associated namespaces set instead of tracking itJohn McCall2009-08-073-78/+69
| | | | | | | separately. Add the framework (currently unfed) for finding friend declarations during argument-dependent lookup. llvm-svn: 78414
* Add vbase offsets to the vtable. Wow, having an rbegin was soMike Stump2009-08-072-2/+14
| | | | | | fortuitous. WIP. llvm-svn: 78413
* Add rbegin and rend for virtual bases, might come in handy some day.Mike Stump2009-08-071-0/+22
| | | | llvm-svn: 78412
* Fix: <rdar://problem/7075531> static analyzer wrongly detects unused ivars ↵Ted Kremenek2009-08-072-7/+48
| | | | | | used in blocks llvm-svn: 78409
* Constify some pointers. No functionality change.Ted Kremenek2009-08-071-15/+16
| | | | llvm-svn: 78407
* More synthesis of copy constructors. Work in progress.Fariborz Jahanian2009-08-075-4/+94
| | | | llvm-svn: 78402
* Fix typo.Mike Stump2009-08-071-1/+1
| | | | llvm-svn: 78401
* Add ability to generate vcall offsets for primary virtual base.Mike Stump2009-08-075-16/+33
| | | | llvm-svn: 78396
* Use the correct cast kind as suggested by Doug.Anders Carlsson2009-08-071-1/+2
| | | | llvm-svn: 78395
* Fix some const_cast issues. This is the beginning of the rabbit hole.Mike Stump2009-08-075-19/+13
| | | | llvm-svn: 78393
* PR3333: warn when shifting by invalid amountRyan Flynn2009-08-073-2/+62
| | | | llvm-svn: 78385
* Separate Stmt::Destroy into the entrypoint for destroying a statementDouglas Gregor2009-08-077-53/+57
| | | | | | | or expression (Destroy) from the virtual function used to actually destroy a given expression (DoDestroy). llvm-svn: 78375
* add support for opensuse 11.1/11.2 search paths, patch by Stefan ReinauerChris Lattner2009-08-071-0/+16
| | | | | | and Carl-Daniel Hailfinger! llvm-svn: 78368
OpenPOWER on IntegriCloud