- Jul 02, 2009
-
-
Douglas Gregor authored
declaration in the AST. The new ASTContext::getCommentForDecl function searches for a comment that is attached to the given declaration, and returns that comment, which may be composed of several comment blocks. Comments are always available in an AST. However, to avoid harming performance, we don't actually parse the comments. Rather, we keep the source ranges of all of the comments within a large, sorted vector, then lazily extract comments via a binary search in that vector only when needed (which never occurs in a "normal" compile). Comments are written to a precompiled header/AST file as a blob of source ranges. That blob is only lazily loaded when one requests a comment for a declaration (this never occurs in a "normal" compile). The indexer testbed now supports comment extraction. When the -point-at location points to a declaration with a Doxygen-style comment, the indexer testbed prints the associated comment block(s). See test/Index/comments.c for an example. Some notes: - We don't actually attempt to parse the comment blocks themselves, beyond identifying them as Doxygen comment blocks to associate them with a declaration. - We won't find comment blocks that aren't adjacent to the declaration, because we start our search based on the location of the declaration. - We don't go through the necessary hops to find, for example, whether some redeclaration of a declaration has comments when our current declaration does not. Similarly, we don't attempt to associate a \param Foo marker in a function body comment with the parameter named Foo (although that is certainly possible). - Verification of my "no performance impact" claims is still "to be done". llvm-svn: 74704
-
Douglas Gregor authored
Look through vector types when determining the base type of a type for declarator printing. Bug found via the PCH tester llvm-svn: 74672
-
Fariborz Jahanian authored
Per Doug's comments. Doug please review. llvm-svn: 74666
-
Ted Kremenek authored
actual lifetime to their logical lifetime. llvm-svn: 74665
-
Douglas Gregor authored
llvm-svn: 74664
-
Ted Kremenek authored
pass misc-ps.m. Currently RegionStore/BasicStore don't do any special reasoning about clang-style vectors, so we should return UnknownVal (in all cases) when accessing their values via an array. llvm-svn: 74660
-
Owen Anderson authored
llvm-svn: 74657
-
Douglas Gregor authored
by distinguishing between substitution that occurs for template argument deduction vs. explicitly-specifiad template arguments. This is used both to improve diagnostics and to make sure we only provide SFINAE in those cases where SFINAE should apply. In addition, deal with the sticky issue where SFINAE only considers substitution of template arguments into the *type* of a function template; we need to issue hard errors beyond this point, as test/SemaTemplate/operator-template.cpp illustrates. llvm-svn: 74651
-
- Jul 01, 2009
-
-
Owen Anderson authored
llvm-svn: 74642
-
Fariborz Jahanian authored
No change in functionality. llvm-svn: 74639
-
Daniel Dunbar authored
- Refactored slightly to make control flow more obvious. llvm-svn: 74637
-
Daniel Dunbar authored
llvm-svn: 74636
-
Daniel Dunbar authored
- The Compilation is just a helper class, it shouldn't have that amount of logic in it. - No functionality change. llvm-svn: 74634
-
Fariborz Jahanian authored
Also has fix for bugzilla-4469. llvm-svn: 74631
-
Daniel Dunbar authored
- Not all tools give good error messages, and sometimes the tool can fail w/o any error (for example, when signalled). - We suppress this message when the failing command is the compiler and it failed normally (exit code == 1), under the assumption that it gave a good diagnostic. For example, for a linker failure we now get: -- ddunbar@lordcrumb:tmp$ clang a.c b.c ld: duplicate symbol _x in /var/folders/cl/clrOX6SaG+moCeRKEI4PtU+++TI/-Tmp-/cc-bXYITq.o and /var/folders/cl/clrOX6SaG+moCeRKEI4PtU+++TI/-Tmp-/cc-6uK4jD.o clang: error: linker command failed with exit code 1 (use -v to see invocation) -- For a compiler crash we get: -- ddunbar@lordcrumb:tmp$ clang t.i Assertion failed: (CGT.getTargetData().getTypeAllocSizeInBits(STy) == RL.getSize()), function layoutStructFields, file CodeGenTypes.cpp, line 573. 0 clang-cc 0x0000000100f1f1f1 PrintStackTrace(void*) + 38 ... stack trace and virtual stack trace follow ... clang: error: compiler command failed due to signal 6 (use -v to see invocation) -- But for a regular compilation failure we get the usual: -- ddunbar@lordcrumb:tmp$ clang c.c c.c:1:6: error: invalid token after top level declarator int x ^ 1 diagnostic generated. -- - No test case, not amenable to non-executable testing. :/ - <rdar://problem/6945613> llvm-svn: 74629
-
Daniel Dunbar authored
Command to be generated, to support more advanced diagnostics. - No functionality change. llvm-svn: 74627
-
Sebastian Redl authored
llvm-svn: 74626
-
Owen Anderson authored
llvm-svn: 74615
-
Douglas Gregor authored
llvm-svn: 74606
-
Steve Naroff authored
This was necessary to simplify some other changes I'm making (wrt ObjC type cleanups). The idea is to separate the constraint checks for block pointers, ObjC pointers, and C pointers (the previous code combined them into one clause). Note: This routine will be further simplified when I integrate the ObjC type cleanups (forthcoming). llvm-svn: 74604
-
Nate Begeman authored
For ExtVectorType, initializer is splatted to all elements. For VectorType, initializer is bitcast to vector type. Verified that for VectorType, output is identical to gcc. llvm-svn: 74600
-
Chris Lattner authored
llvm-svn: 74585
-
Eli Friedman authored
Note that I'm guessing that *BSD and Solaris do the same thing as Linux here, but it's quite possible I'm wrong; if the following testcase gives an error on x86-64 with gcc for any of those operating systems, please tell me: #include <stdint.h> int64_t x; long x; llvm-svn: 74583
-
Zhongxing Xu authored
llvm-svn: 74581
-
Douglas Gregor authored
are fewer template arguments than there are template parameters for that function. llvm-svn: 74578
-
Douglas Gregor authored
substitute those template arguments into the function parameter types prior to template argument deduction. There's still a bit of work to do to make this work properly when only some of the template arguments are specified. llvm-svn: 74576
-
Fariborz Jahanian authored
list. llvm-svn: 74571
-
Douglas Gregor authored
templates, such as make<int&>. These template-ids are only barely functional for function calls; much more to come. llvm-svn: 74563
-
Ted Kremenek authored
TypedRegion. While we plan on removing this code at some point, it serves as a good reference implementation for use with BasicStore until we are sure the new CastRegion logic (in RegionStore.cpp) is correct. llvm-svn: 74559
-
rdar://problem/7021553Ted Kremenek authored
Fix: <rdar://problem/7021553> clang -fsyntax-only crashes (in ParseDeclarationSpecifiers ... from ParseObjCTypeName) Another case where we should use SmallVector::data() instead of taking the address of element 0 of a SmallVector when the SmallVector has no elements. llvm-svn: 74556
-
- Jun 30, 2009
-
-
Fariborz Jahanian authored
fields in the ctor-initializer list. llvm-svn: 74554
-
Ted Kremenek authored
llvm-svn: 74552
-
Fariborz Jahanian authored
in ctor-initializer list. llvm-svn: 74541
-
Douglas Gregor authored
instantiation stack so that we provide a full instantiation backtrace. Previously, we performed all of the instantiations implied by the recursion, but each looked like a "top-level" instantiation. The included test case tests the previous fix for the instantiation of DeclRefExprs. Note that the "instantiated from" diagnostics still don't tell us which template arguments we're instantiating with. llvm-svn: 74540
-
Torok Edwin authored
'make test' passes now. llvm-svn: 74539
-
Torok Edwin authored
llvm-svn: 74536
-
Fariborz Jahanian authored
llvm-svn: 74533
-
Torok Edwin authored
This unifies all the targets supported by an OS into a template. It also cleans up the differences between the darwin targets. Also __LP64__ wasn't needed for *BSD, since x86-64 target defines it anyway. llvm-svn: 74532
-
Douglas Gregor authored
"semantic analysis" part. Use the "semantic analysis" part when performing template instantiation on a DeclRefExpr, rather than an ad hoc list of rules to construct DeclRefExprs from the instantiation. A test case for this change will come in with a large commit, which illustrates what I was actually trying to work on. llvm-svn: 74528
-
Zhongxing Xu authored
Mark the super region of the binding of block level expr in the Environment as live. llvm-svn: 74525
-