Commit Graph

29 Commits

Author SHA1 Message Date
Erich Keane 1a29954b0a Remove stale documentation from InternalsManual.rst
The DuplicatesAllowedWhileMerging was removed a while ago,
but the documentation remained.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337835 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24 16:11:30 +00:00
Erich Keane 74701fe1cf [NFC] Rename clang::AttributeList to clang::ParsedAttr
Since The type no longer contains the 'next' item anymore, it isn't a list,
so rename it to ParsedAttr to be more accurate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337005 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13 15:07:47 +00:00
Eric Fiselier a6a3cf5fce [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages.
Summary:
There are cases where the same string or select is repeated verbatim in a lot of diagnostics. This can be a pain to maintain and update. Tablegen provides no way stash the common text somewhere and reuse it in the diagnostics, until now!

This patch allows diagnostic texts to contain `%sub{<definition-name>}`, where `<definition-name>` names a Tablegen record of type `TextSubstitution`. These substitutions are done early, before the diagnostic string is otherwise processed. All `%sub` modifiers will be replaced before the diagnostic definitions are emitted.

The substitution must specify all arguments used by the substitution, and modifier indexes in the substitution are re-numbered accordingly. For example:

```
def select_ovl_candidate : TextSubstitution<"%select{function|constructor}0%select{| template| %2}1">;
```
when used as
```
"candidate `%sub{select_ovl_candidate}3,2,1 not viable"
```
will act as if we wrote:
```
"candidate %select{function|constructor}3%select{| template| %1}2 not viable"
```

Reviewers: rsmith, rjmccall, aaron.ballman, a.sidorin

Reviewed By: rjmccall

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D46740

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332799 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-19 03:12:04 +00:00
Fangrui Song b868e36dfd [docs] Fix docs/InternalsManual.rst heading.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331225 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-30 20:51:50 +00:00
Fangrui Song 9ab08c3357 Rename DiagnosticClient to DiagnosticConsumer as per issue 5397.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331152 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-30 00:34:09 +00:00
Hiroshi Inoue da170fedbf [NFC] fix trivial typos in comments and documents
"in in" -> "in", "on on" -> "on" etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@323509 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-26 08:15:52 +00:00
Jan Korous a3aaa66c47 Fix typos in documentation
Differential Revision: https://reviews.llvm.org/D38711

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315252 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-09 23:45:20 +00:00
Gabor Horvath 71ca9f8a52 Fix some typos in the documentation.
Patch by: Reka Nikolett Kovacs


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309948 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-03 15:38:14 +00:00
Faisal Vali f69d06e402 [NFC, documentation] Prefer the term expansion instead of macro instantiation
... in the few remaining places where this was not corrected.


  


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308823 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-22 12:04:37 +00:00
Alexander Kornienko 50f99ff279 [docs] Change non-c++ code blocks to 'text' format to fix a sphinx warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261744 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-24 15:07:48 +00:00
Richard Smith e475fd3abe Remove DataRecursiveASTVisitor; it no longer serves any purpose, since it's just an alias for RecursiveASTVisitor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253949 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-24 03:55:01 +00:00
Tanya Lattner 0103b5324e Update mailing list references to lists.llvm.org
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244000 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 03:55:23 +00:00
Aaron Ballman 424a6b5e5a Made considerable updates to the documentation explaining how to add a new attribute to clang. Cleans up some of the existing wording, as well as adding new information and better explanations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237268 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 18:06:48 +00:00
Yaron Keren 6acf794143 Replace DeclContext::getNextContext with DeclContext::collectAllContexts
in the Clang CFE Internals Manual (done in r147729).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@228510 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 22:16:16 +00:00
Nico Weber 6de95fc47a Fix markup from r224894.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224895 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-28 02:12:59 +00:00
Nico Weber 59745e0f88 Add stub sections about Parse, Sema, CodeGen to the internals manual.
I'd be interested if the paragraph on Parse not knowing much about AST is
something folks agree with.  I think this used to be true after rjmccall removed
the Action interface in r112244 and I believe it's still true, but I'm not sure.
(For example, ParseOpenMP.cpp does include AST/StmtOpenMP.h.  Other than that,
Parse not using AST nodes much seems to be still true, though.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224894 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-28 02:07:26 +00:00
David Blaikie c2cb99d6f1 unique_ptrify the result of CFG::buildCFG/CFGBuilder::buildCFG
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216755 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-29 18:53:26 +00:00
Nico Weber d044b4fcaa Update internals manual on how to add AST nodes.
StmtDumper.cpp is called ASTDumper.cpp these days, and usually works well
for new AST nodes without changes.  There's now DataRecursiveASTVisitor
in addition to RecursiveASTVisitor, and serialization wasn't mentioned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212426 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-07 00:50:39 +00:00
Tobias Grosser 9762c97158 Add 'remark' diagnostic type in 'clang'
A 'remark' is information that is not an error or a warning, but rather some
additional information provided to the user. In contrast to a 'note' a 'remark'
is an independent diagnostic, whereas a 'note' always depends on another
diagnostic.

A typical use case for remark nodes is information provided to the user, e.g.
information provided by the vectorizer about loops that have been vectorized.

This patch provides the initial implementation of 'remarks'. It includes the
actual definiton of the remark nodes, their printing as well as basic parameter
handling. We are reusing the existing diagnostic parameters which means a remark
can be enabled with normal '-Wdiagnostic-name' flags and can be upgraded to
an error using '-Werror=diagnostic-name'. '-Werror' alone does not upgrade
remarks.

This patch is by intention minimal in terms of parameter handling. More
experience and more discussions will most likely lead to further enhancements
in the parameter handling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202475 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-28 09:11:08 +00:00
Aaron Ballman b0d5955832 Implements a declarative approach to documenting individual attributes in Clang via a Documentation tablegen class. Also updates the internals manual with information about how to use this new, required, documentation feature.
This patch adds some very, very sparse initial documentation for some attributes. Additional effort from attribute authors is greatly appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201515 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-17 15:27:10 +00:00
Aaron Ballman 4da7eb6bf7 Adding a bit of documentation that was missed with r198883 (when ParseArgumentsAsUnevaluated was added).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199679 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-20 18:42:10 +00:00
Aaron Ballman d3760b5595 Exposed a declarative way to specify that an attribute can be duplicated when merging attributes on a declaration. This replaces some hard-coded functionality from Sema.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199677 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-20 18:07:09 +00:00
Aaron Ballman b043bda69d Updating the documentation about how to add attributes based on the rather extensive refactorings that have happened over the past several months.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198705 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-07 20:12:20 +00:00
Justin Bogner 89eb0d6729 docs: Document CXXLiteralOperatorName and CXXUsingDirective
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191560 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-27 21:10:54 +00:00
Justin Bogner 4e60b9c41f docs: Remove note about Identifiers being used for C++ operators
C++ operators are represented by CXXOperatorName now, which is already
documented.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191559 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-27 21:10:51 +00:00
Dmitri Gribenko 714911f092 Document that we should recognize attributes supported by gcc with C++11
[[gnu::...]] syntax

Pointed out by Richard Smith on the mailing list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172487 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 22:44:07 +00:00
Sean Silva 159cc9e6f6 docs: Fix up HTML links to proper reST links.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171382 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-02 13:07:47 +00:00
Dmitri Gribenko 97555a1368 Documentation: random cleanups. Use monospaced font where appropriate,
highlight console output with "code-block:: console", etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170276 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-15 21:10:51 +00:00
Dmitri Gribenko 5cc0580c6c Documentation: convert InternalsManual.html to reST
Patch by Anastasi Voitova with with small fixes by me.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170275 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-15 20:41:17 +00:00