Commit Graph

57 Commits

Author SHA1 Message Date
Ted Kremenek 2f41ffe825 Add a high-level intro to the memory regions design document.
llvm-svn: 67759
2009-03-26 16:19:54 +00:00
Ted Kremenek a32f7a124a Move "regions" analyzer design document to 'docs'.
llvm-svn: 67752
2009-03-26 15:29:38 +00:00
Chris Lattner 14aea9a39c link to blocks dox
llvm-svn: 66414
2009-03-09 07:03:22 +00:00
Chris Lattner d6daa1dafd add some description of the block language extension.
llvm-svn: 66413
2009-03-09 07:01:20 +00:00
Chris Lattner da84e0d516 The long-rumored blocks implementation document.
llvm-svn: 66410
2009-03-09 06:57:46 +00:00
Chris Lattner 9605a55076 minor wording changes.
llvm-svn: 65648
2009-02-27 19:31:12 +00:00
Douglas Gregor 96977da72c Clean up and document code modification hints.
llvm-svn: 65641
2009-02-27 17:53:17 +00:00
Douglas Gregor 7f74112756 Implement parsing of nested-name-specifiers that involve template-ids, e.g.,
std::vector<int>::allocator_type

When we parse a template-id that names a type, it will become either a
template-id annotation (which is a parsed representation of a
template-id that has not yet been through semantic analysis) or a
typename annotation (where semantic analysis has resolved the
template-id to an actual type), depending on the context. We only
produce a type in contexts where we know that we only need type
information, e.g., in a type specifier. Otherwise, we create a
template-id annotation that can later be "upgraded" by transforming it
into a typename annotation when the parser needs a type. This occurs,
for example, when we've parsed "std::vector<int>" above and then see
the '::' after it. However, it means that when writing something like
this:

  template<> class Outer::Inner<int> { ... };

We have two tokens to represent Outer::Inner<int>: one token for the
nested name specifier Outer::, and one template-id annotation token
for Inner<int>, which will be passed to semantic analysis to define
the class template specialization.

Most of the churn in the template tests in this patch come from an
improvement in our error recovery from ill-formed template-ids.

llvm-svn: 65467
2009-02-25 19:37:18 +00:00
Chris Lattner faca7d9842 fix typo
llvm-svn: 64966
2009-02-18 22:27:46 +00:00
Douglas Gregor 94349fd8cb Allow "overloadable" functions in C to be declared as variadic without
any named parameters, e.g., this is accepted in C:

  void f(...) __attribute__((overloadable));

although this would be rejected:

  void f(...);

To do this, moved the checking of the "ellipsis without any named
arguments" condition from the parser into Sema (where it belongs anyway).

llvm-svn: 64902
2009-02-18 07:07:28 +00:00
Daniel Dunbar 393900ef52 Grammar tweak.
llvm-svn: 64765
2009-02-17 15:49:03 +00:00
Chris Lattner 1156f18175 clarify the behavior of note.
llvm-svn: 64748
2009-02-17 07:07:29 +00:00
Chris Lattner b3ef533286 wrap some crazy long lines.
llvm-svn: 64489
2009-02-13 21:51:45 +00:00
Chris Lattner 9631dfd1c1 document __builtin_shufflevector
llvm-svn: 64485
2009-02-13 20:00:20 +00:00
Douglas Gregor 725de57b7d Add documentation for overloaded functions in C
llvm-svn: 64423
2009-02-13 00:57:04 +00:00
Chris Lattner b8ec6bbb6a new document.
llvm-svn: 64127
2009-02-09 08:46:11 +00:00
Chris Lattner 9d6c4408d1 document fatal
llvm-svn: 63895
2009-02-05 22:49:08 +00:00
Douglas Gregor 2ada048975 Some name-lookup-related fixes, from Piotr Rak!
- Changes Lookup*Name functions to return NamedDecls, instead of
Decls. Unfortunately my recent statement that it will simplify lot of
code, was not quite right, but it simplifies some...
- Makes MergeLookupResult SmallPtrSet instead of vector, following
Douglas suggestions.
- Adds %qN format for printing qualified names to Diagnostic.
- Avoids searching for using-directives in Scopes, which are not
DeclScope, during unqualified name lookup.

llvm-svn: 63739
2009-02-04 17:27:36 +00:00
Steve Naroff 16c8e598ae Name change (isTypeName->getTypeName).
Since it doesn't return a bool, is shouldn't be prefixed with 'is'.

llvm-svn: 63226
2009-01-28 19:39:02 +00:00
Douglas Gregor 6e6ad602e5 Remove ScopedDecl, collapsing all of its functionality into Decl, so
that every declaration lives inside a DeclContext.

Moved several things that don't have names but were ScopedDecls (and,
therefore, NamedDecls) to inherit from Decl rather than NamedDecl,
including ObjCImplementationDecl and LinkageSpecDecl. Now, we don't
store empty DeclarationNames for these things, nor do we try to insert
them into DeclContext's lookup structure.

The serialization tests are temporarily disabled. We'll re-enable them
once we've sorted out the remaining ownership/serialiazation issues
between DeclContexts and TranslationUnion, DeclGroups, etc.

llvm-svn: 62562
2009-01-20 01:17:11 +00:00
Chris Lattner 3c91971b33 rename "virtual location" of a macro to "instantiation location".
llvm-svn: 62315
2009-01-16 07:15:35 +00:00
Chris Lattner ca0c7e5a34 update for terminology change.
llvm-svn: 62310
2009-01-16 07:00:50 +00:00
Cedric Venet 9fee535c84 Fix a typo.
llvm-svn: 61815
2009-01-06 16:22:54 +00:00
Chris Lattner 479ecd7151 document annotation tokens.
llvm-svn: 61792
2009-01-06 06:02:08 +00:00
Douglas Gregor 07665a69e8 Introduce support for "transparent" DeclContexts, which are
DeclContexts whose members are visible from enclosing DeclContexts up
to (and including) the innermost enclosing non-transparent
DeclContexts. Transparent DeclContexts unify the mechanism to be used
for various language features, including C enumerations, anonymous
unions, C++0x inline namespaces, and C++ linkage
specifications. Please refer to the documentation in the Clang
internals manual for more information.

Only enumerations and linkage specifications currently use transparent
DeclContexts.

Still to do: use transparent DeclContexts to implement anonymous
unions and GCC's anonymous structs extension, and, later, the C++0x
features. We also need to tighten up the DeclContext/ScopedDecl link
to ensure that every ScopedDecl is in a single DeclContext, which
will ensure that we can then enforce ownership and reduce the memory
footprint of DeclContext.

llvm-svn: 61735
2009-01-05 19:45:36 +00:00
Chris Lattner 04397358ec Implement the final (hopefully) wrinkle to i-c-e + builtin_constant_p
processing: it allows arbitrary foldable constants as the operand of ?: when
builtin_constant_p is the condition.

llvm-svn: 60954
2008-12-12 18:00:51 +00:00
Chris Lattner 85b25bc344 implement rdar://6091492 - ?: with __builtin_constant_p as the operand is an i-c-e.
llvm-svn: 60934
2008-12-12 06:55:44 +00:00
Chris Lattner e4b95698df Rename Selector::getName() to Selector::getAsString(), and add
a new NamedDecl::getAsString() method.

Change uses of Selector::getName() to just pass in a Selector 
where possible (e.g. to diagnostics) instead of going through
an std::string.

This also adds new formatters for objcinstance and objcclass
as described in the dox.

llvm-svn: 59933
2008-11-24 03:33:13 +00:00
Chris Lattner d125393d24 inserting a qualtype adds quotes implicitly
llvm-svn: 59915
2008-11-23 20:27:13 +00:00
Chris Lattner 4e2e9f1a5d other minor edits.
llvm-svn: 59906
2008-11-23 08:32:53 +00:00
Chris Lattner c788a8bdec minor cleanups.
llvm-svn: 59905
2008-11-23 08:16:56 +00:00
Chris Lattner 1fea89ccb1 finish up the diagnostics documentation. We don't
support QualType and DeclarationName yet, so some of it
is lies, however, this will be fixed shortly.

llvm-svn: 59896
2008-11-23 00:42:53 +00:00
Chris Lattner 80bec16f14 more updates
llvm-svn: 59895
2008-11-23 00:28:33 +00:00
Chris Lattner cc6147cd3b finish documentation of %select.
llvm-svn: 59892
2008-11-22 23:50:47 +00:00
Sebastian Redl 6cae80da20 Documentation for the plural modifier.
llvm-svn: 59885
2008-11-22 22:16:45 +00:00
Chris Lattner e72a8a3048 start documenting Diagnostics. Sebastian, I'd appreciate it
if you can fill in the section for %plural.

llvm-svn: 59883
2008-11-22 21:41:31 +00:00
Douglas Gregor 163c58502a Extend DeclarationName to support C++ overloaded operators, e.g.,
operator+, directly, using the same mechanism as all other special
names.

Removed the "special" identifiers for the overloaded operators from
the identifier table and IdentifierInfo data structure. IdentifierInfo
is back to representing only real identifiers.

Added a new Action, ActOnOperatorFunctionIdExpr, that builds an
expression from an parsed operator-function-id (e.g., "operator
+"). ActOnIdentifierExpr used to do this job, but
operator-function-ids are no longer represented by IdentifierInfo's.

Extended Declarator to store overloaded operator names. 
Sema::GetNameForDeclarator now knows how to turn the operator
name into a DeclarationName for the overloaded operator. 

Except for (perhaps) consolidating the functionality of
ActOnIdentifier, ActOnOperatorFunctionIdExpr, and
ActOnConversionFunctionExpr into a common routine that builds an
appropriate DeclRefExpr by looking up a DeclarationName, all of the
work on normalizing declaration names should be complete with this
commit.

llvm-svn: 59526
2008-11-18 14:39:36 +00:00
Douglas Gregor ae2fbad373 Updated IdentifierResolver to deal with DeclarationNames. The names of
C++ constructors, destructors, and conversion functions now have a
FETokenInfo field that IdentifierResolver can access, so that these
special names are handled just like ordinary identifiers. A few other
Sema routines now use DeclarationNames instead of IdentifierInfo*'s.

To validate this design, this code also implements parsing and
semantic analysis for id-expressions that name conversion functions,
e.g.,

  return operator bool();

The new parser action ActOnConversionFunctionExpr takes the result of
parsing "operator type-id" and turning it into an expression, using
the IdentifierResolver with the DeclarationName of the conversion
function. ActOnDeclarator pushes those conversion function names into
scope so that the IdentifierResolver can find them, of course.

llvm-svn: 59462
2008-11-17 20:34:05 +00:00
Douglas Gregor 77324f3854 Introduction the DeclarationName class, as a single, general method of
representing the names of declarations in the C family of
languages. DeclarationName is used in NamedDecl to store the name of
the declaration (naturally), and ObjCMethodDecl is now a NamedDecl.

llvm-svn: 59441
2008-11-17 14:58:09 +00:00
Chris Lattner 807e8c5d63 Describe how constant folding and i-c-e diagnosing should work.
Unfortunately, we're not here yet, but eventually Expr::isConstantExpr
and friends should go away.

llvm-svn: 59427
2008-11-16 21:48:07 +00:00
Mike Stump b9d50b23a8 Unbreak clang install.
llvm-svn: 54663
2008-08-12 00:32:59 +00:00
Chris Lattner 613fdff902 clean up the footer a bit more.
llvm-svn: 54113
2008-07-26 23:54:49 +00:00
Chris Lattner e3bbfffa5b remove SSIs.
llvm-svn: 54112
2008-07-26 23:52:26 +00:00
Chris Lattner 9213f5d947 Add the right path to the lines image.
llvm-svn: 54111
2008-07-26 23:51:08 +00:00
Daniel Dunbar 086fe1ac79 Add doxygen support
- Stolen from LLVM with minor modifications

llvm-svn: 54103
2008-07-26 21:32:24 +00:00
Ted Kremenek d2c8970a9a Use same CSS as the rest of the clang website.
llvm-svn: 52208
2008-06-11 06:19:49 +00:00
Chris Lattner d5917cef95 update documentation
llvm-svn: 48074
2008-03-09 02:27:26 +00:00
Ted Kremenek efc244722f Minor grammar fix.
llvm-svn: 43154
2007-10-18 22:50:52 +00:00
Ted Kremenek a1cf09f51d Commented out header with no section body. Will write this eventually.
llvm-svn: 42844
2007-10-10 23:22:00 +00:00
Ted Kremenek 035b0cd34a Added some documentation on clang CFGs. It is very rough.
llvm-svn: 42843
2007-10-10 23:01:43 +00:00