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

149 Коммитов

Автор SHA1 Сообщение Дата
Chris Lattner 0224680502 fix typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64966 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 22:27:46 +00:00
Douglas Gregor 965acbb321 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).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64902 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 07:07:28 +00:00
Daniel Dunbar 426b863a86 Grammar tweak.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64765 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 15:49:03 +00:00
Chris Lattner a180fdd8fd clarify the behavior of note.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64748 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 07:07:29 +00:00
Chris Lattner f161d4155f wrap some crazy long lines.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64489 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-13 21:51:45 +00:00
Chris Lattner 6f72da53ce document __builtin_shufflevector
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64485 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-13 20:00:20 +00:00
Douglas Gregor cb54d4362f Add documentation for overloaded functions in C
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64423 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-13 00:57:04 +00:00
Chris Lattner 5ce933f68c new document.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64127 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09 08:46:11 +00:00
Chris Lattner 0aad297c0b document fatal
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63895 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 22:49:08 +00:00
Douglas Gregor 47b9a1ca55 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63739 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 17:27:36 +00:00
Steve Naroff b43a50ff1b Name change (isTypeName->getTypeName).
Since it doesn't return a bool, is shouldn't be prefixed with 'is'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63226 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-28 19:39:02 +00:00
Douglas Gregor 4afa39deaa 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62562 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-20 01:17:11 +00:00
Chris Lattner 88054dee04 rename "virtual location" of a macro to "instantiation location".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62315 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 07:15:35 +00:00
Chris Lattner 18376ddf4d update for terminology change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62310 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 07:00:50 +00:00
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