| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 42594
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add comments.
Switch to new indentation style for the Action class. Since many actions take many arguments, the new style will...
- make it easier to add/remove arguments without messing up the indentation...
- make it easier to add comments to each argument (see ActOnMethodDeclaration for an example)...
- in general, just makes it easier to see what is being passed.
The rest of Actions will be converted "lazily"...there is no immediate need to hack all the existing methods.
llvm-svn: 42587
|
|
|
|
|
|
| |
getter names.
llvm-svn: 42577
|
|
|
|
|
|
|
|
|
| |
more to do).
Remove Action::ObjCStartCategoryInterface/ObjCFinishInterface - they are unused.
.
llvm-svn: 42559
|
|
|
|
|
|
| |
and their accessors in a variety of objective-c classes.
llvm-svn: 42555
|
|
|
|
|
|
|
|
| |
- Add ObjcMessageExpr::getSelector(), getClassName().
- Change Sema::getObjCInterfaceDecl() to simply take an IdentifierInfo (no Scope needed).
- Remove FIXME for printing ObjCMessageExpr's.
llvm-svn: 42543
|
|
|
|
|
|
|
|
| |
related to
unimplemented methods in category implementation.
llvm-svn: 42531
|
|
|
|
|
|
| |
Update clients and add to project file.
llvm-svn: 42494
|
|
|
|
|
|
|
| |
There is still an issue if doing ScopedLookup is an overkill and we can
just access the decl using the identifier.
llvm-svn: 42463
|
|
|
|
|
|
|
|
|
|
|
|
| |
This motivated implementing a devious clattner inspired solution:-)
This approach uses a small value "Selector" class to point to an IdentifierInfo for the 0/1 case. For multi-keyword selectors, we instantiate a MultiKeywordSelector object (previously known as SelectorInfo). Now, the incremental cost for selectors is only 24,800 for Cocoa.h! This saves 156,592 bytes, or 86%!! The size reduction is also the result of getting rid of the AST slot, which was not strictly necessary (we will associate a selector with it's method using another table...most likely in Sema).
This change was critical to make now, before we have too many clients.
I still need to add some comments to the Selector class...will likely add later today/tomorrow.
llvm-svn: 42452
|
|
|
|
|
|
|
|
| |
with method implementation declarations .
It checks and warns on those methods declared in class interface and not implemented.
llvm-svn: 42412
|
|
|
|
|
|
|
|
|
|
| |
fixing:
VoidMethod.m:14:5: warning: expression result unused
[Greeter hello];
^~~~~~~~~~~~~~~
llvm-svn: 42380
|
|
|
|
|
|
| |
moved to include/clang/Analysis/FlowSensitive.
llvm-svn: 42327
|
|
|
|
|
|
|
|
|
| |
info. It also adds more
semantic checks for class and protocol declarations. Test cases are good indications of kind of
checking being done in this patch.
llvm-svn: 42311
|
|
|
|
|
|
| |
values. Patch mostly by Gabor Greif for PR1682.
llvm-svn: 42203
|
|
|
|
| |
llvm-svn: 42176
|
|
|
|
|
|
| |
functionality is still preliminary.
llvm-svn: 42152
|
|
|
|
|
|
|
|
|
|
|
| |
- Add ObjcMessageExpr AST node and associated constructors.
- Add SourceLocation's to ActOnKeywordMessage/ActOnUnaryMessage API.
- Instantiate message expressions...
- Replace alloca usage with SmallString.
Next step, installing a correct type, among other tweaks...
llvm-svn: 42116
|
|
|
|
|
|
| |
renamed.
llvm-svn: 42057
|
|
|
|
|
|
|
|
|
|
|
|
| |
ObjcKeywordMessage.
- Removed helper ObjcGetSelectorInfo(), moving the code directly into ObjcBuildMethodDeclaration().
- Many refinements to ParseObjCMessageExpression().
- Add ActOnMessageExpression().
Next step, finish the message actions and (finally) create/instantiate an ObjcMessageExpr AST.
llvm-svn: 42050
|
|
|
|
| |
llvm-svn: 42030
|
|
|
|
|
|
|
|
|
|
| |
- Add SelectorInfo/SelectorTable classes, modeled after IdentifierInfo/IdentifierTable.
- Add SelectorTable instance to ASTContext, created lazily through ASTContext::getSelectorInfo().
- Add SelectorInfo slot to ObjcMethodDecl.
- Add helper function to derive a SelectorInfo from ObjcKeywordInfo.
Misc: Got the Decl stats stuff up and running again...it was missing support for ObjC AST's.
llvm-svn: 42023
|
|
|
|
| |
llvm-svn: 42013
|
|
|
|
| |
llvm-svn: 41990
|
|
|
|
|
|
| |
The previous naming scheme was confusing, since it resulted in both the Parser and Action modules having methods with the same name. In addition, the Action module never does any parsing...
llvm-svn: 41986
|
|
|
|
|
|
|
|
|
|
| |
Analysis/DataflowSolver.h
Analysis/UnintializedValues.cpp
include/clang/Analysis/CFGVarDeclVisitor.h
include/clang/Analysis/DataflowValues.h
include/clang/Analysis/UninitializedValues.h
llvm-svn: 41974
|
|
|
|
|
|
|
|
| |
- Adding a safer prologue. The previous prologue would accept a null and therefore assume we had an interface (which was incorrect).
- Fixed FieldDecl's classof method. This allowed me to simplify some unnecessary casting.
- When diagnosing errors, make sure the FieldDecl/EnclosingDecl are marked as invalid. In addition, don't delete the field...rather, add all fields to the enclosing decl. Memory management can/should be done elsewhere. This code was never "upgraded" to the recently added invalid decl strategy.
llvm-svn: 41964
|
|
|
|
| |
llvm-svn: 41961
|
|
|
|
|
|
| |
Decl is now svelte:-)
llvm-svn: 41935
|
|
|
|
| |
llvm-svn: 41932
|
|
|
|
| |
llvm-svn: 41894
|
|
|
|
| |
llvm-svn: 41886
|
|
|
|
|
|
|
| |
- Instantiate the node in Sema::ParseField(), based on the type of the TagDecl.
- Add Sema::ObjcAddInstanceVariable(), responsible for adorning/adding the ObjcIvarDecl.
llvm-svn: 41864
|
|
|
|
| |
llvm-svn: 41860
|
|
|
|
| |
llvm-svn: 41803
|
|
|
|
|
|
|
|
|
|
| |
to variables that are no longer live. This analysis is built on top
of CFGs and the LiveVariables analysis.
changes to driver:
added driver option "-check-dead-stores" to run the analysis
llvm-svn: 41754
|
|
|
|
|
|
|
|
|
|
| |
source-level CFGs. This code may change significantly in the near
future as we explore different means to implement dataflow analyses.
Added a driver option, -dump-live-variables, to view the output of
live variable analysis. This output is very ALPHA; it will be improved shortly.
llvm-svn: 41737
|
|
|
|
|
|
|
|
| |
and methods.
Lot's of small changes to the parser.
llvm-svn: 41732
|
|
|
|
|
|
|
|
|
| |
- ArrayType::getBaseType(), and
- ConstantArrayType::getMaximumElements().
Wanted to do this cleanup before adding structure support, which will add more complexity.
llvm-svn: 41715
|
|
|
|
|
|
|
|
|
|
| |
warn about the last stmt in a stmtexpr, f.e. there should be no warning for:
int maxval_stmt_expr(int x, int y) {
return ({int _a = x, _b = y; _a > _b ? _a : _b; });
}
llvm-svn: 41655
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
be passed as an (optional) argument to StmtPrinter to customize
printing of AST nodes.
Used new PrinterHelper interface to enhance printing and visualization
of CFGs. The CFGs now illustrate the semantic connectives between
statements and terminators, wheras in the previous printing certain
expressions would (visible) be printed multiple times to reflect which
expressions used the results of other expressions.
The end result is that the CFG is easier to read for flow of
expression values (following principles similar to the LLVM IR).
llvm-svn: 41651
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For example, -parse-ast-dump now prints:
static inline int __inline_isinff(float __x)
(CompoundStmt 0x2409a20
(ReturnStmt 0x2409a10
(BinaryOperator 0x24099f0 'int' <///usr/include/architecture/i386/math.h:183:63, col:102> '=='
(CallExpr 0x24098f0 'float' <col:63, col:82>
(ImplicitCastExpr 0x24098e0 'float (*)(float)' <col:63>
(DeclRefExpr 0x2409880 'float (float)' <col:63> Decl='__builtin_fabsf' 0x2409840))
(DeclRefExpr 0x24098a0 'float' <col:79> Decl='__x' 0x2409810))
(CallExpr 0x24099c0 'float' <col:87, col:102>
(ImplicitCastExpr 0x2409870 'float (*)(void)' <col:87>
(DeclRefExpr 0x2409980 'float (void)' <col:87> Decl='__builtin_inff' 0x2409940))))))
where it only prints filename/line# if it changes from the previous value. We
really need loc info on stmts though, like we have on exprs.
llvm-svn: 41602
|
|
|
|
|
|
| |
A small bit of codegen work is still pending.
llvm-svn: 41571
|
|
|
|
|
|
|
|
|
| |
Remove bogus type conversions in Sema::GetTypeForDeclarator(). This commit
only deals with the array types (DeclaratorCheck::Array), though the
rest of this routine should be reviewed. Given the complexity of C declarators,
I don't want to change the entire routine now (will discuss with Chris tomorrow).
llvm-svn: 41443
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
represent imaginary literals:
float _Complex A;
void foo() {
A = 1.0iF;
}
generates:
(BinaryOperator 0x2305ec0 '_Complex float' '='
(DeclRefExpr 0x2305e60 '_Complex float' Decl='A' 0x2305cf0)
(ImaginaryLiteral 0x2305f40 '_Complex float'
(FloatingLiteral 0x2305ea0 'float' 1.000000))))
llvm-svn: 41413
|
|
|
|
|
|
| |
ignore 'namespace foo {}'
llvm-svn: 41400
|
|
|
|
|
|
| |
operators in all their glory :)
llvm-svn: 41373
|
|
|
|
| |
llvm-svn: 41370
|
|
|
|
|
|
|
|
|
| |
CGExprScalar.cpp file.
This patch temporarily breaks compound assignment operators, but greatly simplifies many
things.
llvm-svn: 41355
|
|
|
|
| |
llvm-svn: 41350
|