Граф коммитов

35 Коммитов

Автор SHA1 Сообщение Дата
Cedric Venet da76b28553 Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61815 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-06 16:22:54 +00:00
Chris Lattner 3932fe05a1 document annotation tokens.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61792 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-06 06:02:08 +00:00
Douglas Gregor 074149e11b 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61735 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 19:45:36 +00:00
Chris Lattner 42b83dde7c 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60954 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-12 18:00:51 +00:00
Chris Lattner 28daa53db7 implement rdar://6091492 - ?: with __builtin_constant_p as the operand is an i-c-e.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60934 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-12 06:55:44 +00:00
Chris Lattner 077bf5e2f4 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59933 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 03:33:13 +00:00
Chris Lattner 545b368e61 inserting a qualtype adds quotes implicitly
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59915 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-23 20:27:13 +00:00
Chris Lattner 3fcbb89cac other minor edits.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59906 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-23 08:32:53 +00:00
Chris Lattner 552de0a0a4 minor cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59905 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-23 08:16:56 +00:00
Chris Lattner fd408eab4c 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59896 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-23 00:42:53 +00:00
Chris Lattner 627b705fa1 more updates
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59895 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-23 00:28:33 +00:00
Chris Lattner cc54334ba4 finish documentation of %select.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59892 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-22 23:50:47 +00:00
Sebastian Redl 6816856fb1 Documentation for the plural modifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59885 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-22 22:16:45 +00:00
Chris Lattner 62fd278ff9 start documenting Diagnostics. Sebastian, I'd appreciate it
if you can fill in the section for %plural.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59883 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-22 21:41:31 +00:00
Douglas Gregor e94ca9e437 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59526 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-18 14:39:36 +00:00
Douglas Gregor 2def48394f 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59462 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-17 20:34:05 +00:00
Douglas Gregor 2e1cd4264d 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59441 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-17 14:58:09 +00:00
Chris Lattner 7bad1995d5 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59427 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-16 21:48:07 +00:00
Mike Stump c7856761ce Unbreak clang install.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54663 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 00:32:59 +00:00
Chris Lattner beb77b1edc clean up the footer a bit more.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54113 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-26 23:54:49 +00:00
Chris Lattner 2f17c1c4c0 remove SSIs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54112 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-26 23:52:26 +00:00
Chris Lattner d83d006317 Add the right path to the lines image.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54111 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-26 23:51:08 +00:00
Daniel Dunbar 1ede17ad36 Add doxygen support
- Stolen from LLVM with minor modifications



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54103 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-26 21:32:24 +00:00
Ted Kremenek 17a295d8f6 Use same CSS as the rest of the clang website.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52208 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-11 06:19:49 +00:00
Chris Lattner 7928125470 update documentation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48074 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 02:27:26 +00:00
Ted Kremenek 18e17e773a Minor grammar fix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43154 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-18 22:50:52 +00:00
Ted Kremenek 98f19b69c9 Commented out header with no section body. Will write this eventually.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42844 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-10 23:22:00 +00:00
Ted Kremenek 8bc05711e8 Added some documentation on clang CFGs. It is very rough.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42843 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-10 23:01:43 +00:00
Bill Wendling 30d177599e Fix spacing issues.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42676 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-06 01:56:01 +00:00
Chris Lattner 8438624b54 Fix html problem, patch by Justin Handville
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42011 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-16 19:25:23 +00:00
Chris Lattner 33fc68a7c3 Owen pointed out that this made no sense :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40644 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 18:54:50 +00:00
Chris Lattner 11406c1428 update name
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40637 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 16:50:51 +00:00
Chris Lattner 8a2bc625e8 Oops, I committed the wrong file before. This expands the description of
type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40620 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 06:37:39 +00:00
Chris Lattner 86920d33ad Add a start at a clang internals manual, documenting some
of the more subtle and interesting classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40615 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 05:42:17 +00:00
Chris Lattner 9572a5f5ea add documentation skeleton
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40471 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-24 18:03:18 +00:00