summaryrefslogtreecommitdiffstats
path: root/clang/Sema/Sema.h
Commit message (Collapse)AuthorAgeFilesLines
* Make a major restructuring of the clang tree: introduce a top-levelChris Lattner2008-03-151-823/+0
| | | | | | | | | | lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. llvm-svn: 48402
* improve DeclStmt to be able to store SourceRange info correctly.Chris Lattner2008-03-131-1/+2
| | | | | | | Set the start of DeclStmt range. Right now the end is meaningless though. llvm-svn: 48330
* Add fastcall/stdcall attribute supportNate Begeman2008-03-071-1/+3
| | | | | | Generate CallingConv::Fast when fastcall attribute is present llvm-svn: 48017
* Add a bunch of attributes, patch by Nuno Lopes.Chris Lattner2008-03-031-0/+7
| | | | llvm-svn: 47837
* Added support for attribute "noreturn."Ted Kremenek2008-02-271-0/+1
| | | | llvm-svn: 47689
* add parsing, ast building and pretty printing support for C++ throw expressions.Chris Lattner2008-02-261-0/+4
| | | | | | Patch by Mike Stump! llvm-svn: 47582
* Handle __attribute__((annotate("string")))Nate Begeman2008-02-211-0/+1
| | | | llvm-svn: 47451
* move type attribute processing into the creatively named ↵Chris Lattner2008-02-211-1/+3
| | | | | | ProcessTypeAttributes method. llvm-svn: 47418
* move ConvertDeclSpecToType into SemaChris Lattner2008-02-201-0/+1
| | | | llvm-svn: 47415
* Tabs are the enemyNate Begeman2008-02-201-7/+7
| | | | llvm-svn: 47410
* Handle packed attribute correctlyAnders Carlsson2008-02-161-1/+2
| | | | llvm-svn: 47197
* Add a diagnostics helper to remove some redundant code.Steve Naroff2008-02-101-1/+4
| | | | llvm-svn: 46936
* A bunch-o changes to fix <rdar://problem/5716046> incomplete implementation ↵Steve Naroff2008-02-081-1/+2
| | | | | | | | of ObjC class warning is incomplete As part of this fix, I made a low-level change to the text diagnostics machinery (to basically avoid printing duplicate source lines/carets when you have multiple diagnostics that refer to the same exact place). For now, this only happens with we don't have a source range (could be extended to support source ranges as well). llvm-svn: 46897
* Put back the top-level asm code; all tests pass now.Anders Carlsson2008-02-081-1/+2
| | | | llvm-svn: 46868
* Back out 46855 for now, it causes test failures on Darwin.Anders Carlsson2008-02-081-2/+1
| | | | llvm-svn: 46867
* Handle top-level asm declarations.Anders Carlsson2008-02-071-1/+2
| | | | llvm-svn: 46855
* pass the astconsumer into Sema's ctor, clean up some stuff in Chris Lattner2008-02-061-2/+3
| | | | | | | Sema::ActOnTranslationUnitScope. The various ObjC pieces at the top of Sema.cpp should be moved into SemaObjC or something. llvm-svn: 46787
* Handle simple asm statements correctly.Anders Carlsson2008-02-051-0/+1
| | | | llvm-svn: 46777
* Add experimental support for address space qualified types. Address spaceChristopher Lamb2008-02-041-1/+8
| | | | | | qualifiers use the __attribute__((address_space(id))) syntax. llvm-svn: 46691
* AST for @synchronized.Fariborz Jahanian2008-01-291-0/+3
| | | | llvm-svn: 46524
* Replace Sema::CheckVariableInitList, CheckConstantInitList, and ↵Steve Naroff2008-01-251-10/+2
| | | | | | | | | | CheckForCharArrayInitializer with CheckInitializerListTypes. The new routine now supports struct/union initializers. This is a modified version of a patch by Eli Friedman. This version passes all of the clang tests and supports vectors:-) Note that Eli and I are still unsatisfied the implementation of CheckInitializerListTypes(). We'd like to find a more elegant implementation. Nevertheless, this is a complex part of the standard (and may be hard to simplify). Since the complexity is localized to this routine, we can iterate without too much disruption:-) llvm-svn: 46339
* - Add Sema::CheckStringLiteralInit, Sema::IsStringLiteralInit.Steve Naroff2008-01-221-0/+4
| | | | | | - Use previous hooks to simplify Sema::CheckInitializerTypes()... llvm-svn: 46235
* Implement basic overload support via a new builtin, __builtin_overload.Nate Begeman2008-01-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | __builtin_overload takes 2 or more arguments: 0) a non-zero constant-expr for the number of arguments the overloaded functions will take 1) the arguments to pass to the matching overloaded function 2) a list of functions to match. The return type of __builtin_overload is inferred from the function whose args match the types of the arguments passed to the builtin. For example: float a; float sinf(float); int sini(int); float b = __builtin_overload(1, a, sini, sinf); Says that we are overloading functions that take one argument, and trying to pass an argument of the same type as 'a'. sini() does not match since it takes and argument of type int. sinf does match, so at codegen time this will turn into float b = sinf(a); llvm-svn: 46132
* Move promoteExprToType from being a static method in SemaExpr.cpp to beingChris Lattner2008-01-161-0/+4
| | | | | | | | | | a method named ImpCastExprToType in Sema. Use this method to insert implicit casts for case statements from their operand type to the condition type of the switch. This fixes a crash on test/CodeGen/statements.c, reported by Eli Friedman. llvm-svn: 46083
* Add first pieces of support for parsing and representing Chris Lattner2008-01-121-0/+3
| | | | | | extern "C" in C++ mode. Patch by Mike Stump! llvm-svn: 45904
* - Teach Expr::isConstantExpr() about InitListExpr's (and offsetof, since I ↵Steve Naroff2008-01-101-7/+7
| | | | | | | | | | noticed it was missing). - Rename CheckInitializer() to CheckInitializerTypes(). - Removed the isStatic argument to CheckInitializerTypes() and all of it's subroutines. Checking for constant expressions is now done separately. - Added CheckForConstantInitializer(). llvm-svn: 45840
* Substituted all instances of the string "Objc" for "ObjC". This fixesTed Kremenek2008-01-071-47/+47
| | | | | | | some naming inconsistencies in the names of classes pertaining to Objective-C support in clang. llvm-svn: 45715
* Minor refactoring of foreach's semantics code per Chris's suggetion.Fariborz Jahanian2008-01-041-1/+1
| | | | llvm-svn: 45604
* add comments for the various AssignConvertType's, and split int->pointer ↵Chris Lattner2008-01-041-3/+29
| | | | | | from pointer->int. llvm-svn: 45591
* Merge all the 'assignment' diagnostic code into one routine, decloning Chris Lattner2008-01-041-13/+21
| | | | | | | | | | | | | it from several places. This merges the diagnostics, making them more uniform and fewer in number. This also simplifies and cleans up the code. Some highlights: 1. This removes a bunch of very-similar diagnostics. 2. This renames AssignmentCheckResult -> AssignConvertType 3. This merges PointerFromInt + IntFromPointer which were always treated the same. 4. This updates a bunch of test cases that have minor changes to the produced diagnostics. llvm-svn: 45589
* Patch to add semantics check for ObjC2's foreacn statement.Fariborz Jahanian2008-01-041-0/+4
| | | | llvm-svn: 45561
* generalize some of the conversion warnings.Chris Lattner2008-01-031-0/+2
| | | | llvm-svn: 45560
* give better diagnostics for converting between function pointer and void*.Chris Lattner2008-01-031-0/+1
| | | | llvm-svn: 45556
* Patch to parse/build AST ObjC2's foreach statement.Fariborz Jahanian2008-01-031-0/+5
| | | | llvm-svn: 45539
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-291-2/+2
| | | | | | discussion of this change. llvm-svn: 45410
* Change Sema::ActOnCallExpr to construct the CallExpr early and put it intoChris Lattner2007-12-281-21/+11
| | | | | | | | | | | | and OwningPtr instead of constructing only after all of sema is done. This has a couple of effects: 1. it fixes memory leaks from all the error cases in sema 2. it simplifies the code significantly. The cost of this is that the error case now new's and delete's an expr where it did not before, but we don't care about the perf of the error case. llvm-svn: 45380
* implement semantic analysis for __builtin_islessequal and friends.Chris Lattner2007-12-201-0/+2
| | | | llvm-svn: 45239
* refactor some code that handles sema of direct function calls.Chris Lattner2007-12-191-4/+3
| | | | llvm-svn: 45234
* Fix an embarassing typo and add some very limited support for the aligned ↵Anders Carlsson2007-12-191-0/+2
| | | | | | attribute. llvm-svn: 45195
* implement correct semantic analysis for shifts. For:Chris Lattner2007-12-121-1/+1
| | | | | | | | | | | | int test(int x, long long y) { return x << y; } we now realize the type of the shift is int, not long long. This fixes a fixme from june. llvm-svn: 44912
* Add ObjC parser support for concatenated ObjC strings. Note thatChris Lattner2007-12-121-2/+3
| | | | | | | | this is passed to sema and ignored there, so the second part of the string will not make it into the AST. Passing to Fariborz to finish Sema + AST construction. llvm-svn: 44898
* Add support for initializing char arrays from string literals.Steve Naroff2007-12-101-1/+4
| | | | | | Adapted from a patch by Anders Carlsson. llvm-svn: 44816
* Patch to implement "Protocol" as a built-in type declared asFariborz Jahanian2007-12-071-4/+2
| | | | | | "@class Protocol;" llvm-svn: 44670
* Simplified setting up Method's scope before generating AST for its nody.Fariborz Jahanian2007-12-041-1/+1
| | | | llvm-svn: 44576
* Yesterday, I simplified how we stream top-level decls.Steve Naroff2007-11-291-8/+1
| | | | | | | After a discussion with Ted, we both came to the conclusion that adding a "HandleTopLevelDeclaration" hook to ASConsumer is far more elegant. The default implementation of HandleTopLevelDeclaration will be responsible for iterating over the ScopedDecl (which has a chain of the decls:-). TODO: Once Ted adds HandleTopLevelDeclaration, make sure TagDecls are chainged appropriately... llvm-svn: 44445
* Several fixes/simplifications surrounding how we stream top-level decl AST's.Steve Naroff2007-11-281-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following code... typedef struct cssm_data {} CSSM_DATA, *CSSM_DATA_PTR; struct Y { int A; }; struct X { int A; } D; struct X E, F; ...now produces the following output... > ../../Debug/bin/clang xx.c -ast-print Read top-level tag decl: 'cssm_data' typedef struct cssm_data CSSM_DATA; typedef struct cssm_data *CSSM_DATA_PTR; Read top-level tag decl: 'Y' Read top-level tag decl: 'X' Read top-level variable decl: 'D' Read top-level variable decl: 'E' Read top-level variable decl: 'F' ...which is much more accurate than the previous -ast-print output... typedef struct cssm_data CSSM_DATA; typedef struct cssm_data CSSM_DATA; Read top-level variable decl: 'D' Read top-level variable decl: 'E' Read top-level variable decl: 'E' llvm-svn: 44421
* Add comment to CheckVectorCast.hAnders Carlsson2007-11-271-0/+3
| | | | llvm-svn: 44356
* Report errors for invalid casts from/to vectors.Anders Carlsson2007-11-271-0/+3
| | | | llvm-svn: 44350
* Moved logic for -Wfloat-equal to SemaChecking.cpp.Ted Kremenek2007-11-251-0/+2
| | | | | | | | | Moved utility functions IgnoreParen and friends to be static inline functions defined in SemaUtil.h. Added SemaUtil.h to Xcode project. llvm-svn: 44312
* Keep track of whether the asm is volatile or not.Anders Carlsson2007-11-231-0/+1
| | | | llvm-svn: 44297
OpenPOWER on IntegriCloud