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

46 Коммитов

Автор SHA1 Сообщение Дата
John McCall 3a47e23471 Document the extensions I made to the diagnostics-formatting system yesterday.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93439 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 19:12:17 +00:00
Chris Lattner d3509faadc clang tracks multiple levels of macro expansion
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81811 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 23:44:08 +00:00
Argyrios Kyrtzidis 7240d77c96 Add documentation for the Index library to clang's web page.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75222 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 03:41:36 +00:00
Douglas Gregor 32110dfd1c Start documenting precompiled headers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72146 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-20 00:16:32 +00:00
Ted Kremenek cfa8d57f83 Add link from internals manual to PTH documentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68717 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-09 18:08:18 +00:00
Daniel Dunbar 27d9e9f440 Some very rough Driver documentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68030 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-30 06:50:01 +00:00
Chris Lattner 34c0533a00 minor wording changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65648 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-27 19:31:12 +00:00
Douglas Gregor b2fb6de907 Clean up and document code modification hints.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65641 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-27 17:53:17 +00:00
Douglas Gregor 39a8de10c1 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65467 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-25 19:37:18 +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 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
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