1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
Commit Graph

70 Commits

Author SHA1 Message Date
Reid Kleckner
56e21c5de4 Update docs to reflect new minimum MSVC version requirement
Mailing list discussion about this:
http://lists.llvm.org/pipermail/llvm-dev/2016-September/104631.html

Code changes to simplify the ifdefs will come next, and can be reverted
without affecting the policy if someone needs it.

llvm-svn: 284660
2016-10-19 23:04:41 +00:00
Teresa Johnson
b21b115cce [docs] Increase minimum supported GCC version for building LLVM to 4.8
Summary:
The RFC proposal sent to increase the minimum required GCC version
to 4.8 received a lot of support. See the following thread:
http://lists.llvm.org/pipermail/llvm-dev/2016-October/105955.html,

This patch implements that by updating the docs. I believe the
references to libstdc++ 4.7 issues can be removed as well, please
let me know if that is not the case or if they should be updated
a different way.

Reviewers: rengolin

Subscribers: llvm-commits

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

llvm-svn: 284497
2016-10-18 17:17:37 +00:00
Renato Golin
f39706c65a [docs] Reduce the number of places 'minimum requirements' is mentioned to one
llvm-svn: 284380
2016-10-17 12:29:00 +00:00
Alexander Kornienko
3a2952c312 [docs] Fix naming style in the example
llvm-svn: 282490
2016-09-27 14:49:45 +00:00
Chandler Carruth
6f18fb32db Make the coding standards a bit more clear that we prefer the fancy new
auto-brief format for doxygen comments. Most notable is switching to
that in the example doxygen comment. I've also tweaked the wording but
am happy to tweak it further if others have suggestions here.

Mostly doing this to capture something I and others have been writing
consistently and repeatedly in code reviews.

llvm-svn: 280419
2016-09-01 22:18:25 +00:00
Zachary Turner
c9ffc82e08 Update coding standards for include style.
Reviewed By: lattner
Differential Revision: https://reviews.llvm.org/D23591

llvm-svn: 279560
2016-08-23 20:07:32 +00:00
Andrey Bokhanko
584f261fc5 Clarify the statement on using #if 0 ... #endif in CodingStandards.
The statement on using #if 0 ... #endif is not very clear (for people like me
:-)). This patch clarifies it a bit to avoid confusion.

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

llvm-svn: 278932
2016-08-17 14:53:18 +00:00
Yaron Keren
6479d6085a Disable Visual C++ 2013 Debug mode assert on null pointer in some STL algorithms,
such as std::equal on the third argument. This reverts previous workarounds.

Predefining _DEBUG_POINTER_IMPL disables Visual C++ 2013 headers from defining
it to a function performing the null pointer check. In practice, it's not that
bad since any function actually using the nullptr will seg fault. The other
iterator sanity checks remain enabled in the headers.

Reviewed by Aaron Ballmanþ and Duncan P. N. Exon Smith.

llvm-svn: 245711
2015-08-21 17:31:03 +00:00
Vedant Kumar
3af788ee60 [docs] Fix minor typo in CodingStandards.rst
llvm-svn: 245473
2015-08-19 18:19:12 +00:00
Tanya Lattner
a72d000c61 Rename all references to old mailing lists to new lists.llvm.org address.
llvm-svn: 243999
2015-08-05 03:51:17 +00:00
Matthias Braun
f0934645e6 Doxygen: Enable autobrief feature and update coding standards.
llvm-svn: 237417
2015-05-15 03:34:01 +00:00
Reid Kleckner
f16b28762e Add a note about permitting default member initializers
Use them in WinEHPrepare so that we can spot any toolchain bugs that
come up.

llvm-svn: 236244
2015-04-30 18:17:12 +00:00
Benjamin Kramer
11906dabef CodingStyle: Allow delegating ctors
Delegating constructors seem to work fine with all supported compilers.

llvm-svn: 231473
2015-03-06 13:46:50 +00:00
Aaron Ballman
d0d3ba7199 Initializer lists are supported in MSVC 2013. Since that's our minimum required version, we can move that to the list of acceptable C++11 features.
llvm-svn: 231313
2015-03-04 23:17:31 +00:00
Reid Kleckner
27f79d7986 Delete LLVM_DELETED_FUNCTION from coding standards
It didn't seem worth leaving behind a guideline to use '= delete' to
make a class uncopyable. That's a well known C++ design pattern.

Reported on the mailing list and in PR22724.

llvm-svn: 230776
2015-02-27 18:34:16 +00:00
Chris Lattner
21feff6ab2 fix a typo
llvm-svn: 230510
2015-02-25 17:28:41 +00:00
Benjamin Kramer
a78f8364ea Document that defaulted & deleted methods and explicit conversions are allowed now.
llvm-svn: 229369
2015-02-16 10:28:41 +00:00
Benjamin Kramer
c1b3bb4e32 Remove LLVM_HAS_VARIADIC_TEMPLATES and all the faux variadic workarounds guarded by it.
We no longer support compilers without variadic template support.

llvm-svn: 229324
2015-02-15 19:34:28 +00:00
Benjamin Kramer
4579422ac9 Update the docs to require at least MSVC 2013.
llvm-svn: 229323
2015-02-15 19:34:17 +00:00
Paul Robinson
4e123e1b82 Explicitly describe '///' versus '//' comment delimiters.
llvm-svn: 226750
2015-01-22 00:19:56 +00:00
Peter Collingbourne
446da99897 Introduce Go coding standards for LLVM.
Rather than define our own standards, we adopt a set of best practices that
are already in use by the Go community.

Differential Revision: http://reviews.llvm.org/D5761

llvm-svn: 219646
2014-10-14 00:40:53 +00:00
Duncan P. N. Exon Smith
9e2de65efb CodingStandards: Document std::equal misbehaviour
I should have included this as part of r215986, which worked around this
corner by changing ArrayRef::equals() not to use std::equal.  Alas.

llvm-svn: 215988
2014-08-19 16:49:40 +00:00
Reid Kleckner
7067950c24 Remove the recommendation against using std::function
Clang-cl supports MSVC-style RTTI now, and we can even compile
typeid(...) with /GR-.  Just don't instantiate std::function with a
polymorphic type, or bad things will happen.

llvm-svn: 212148
2014-07-02 00:42:07 +00:00
Richard Smith
7e2199ed8d Update programmers manual to cover llvm::function_ref, and add a note to the
coding standard suggesting using it instead of the (unavailable) std::function.

llvm-svn: 208067
2014-05-06 07:45:39 +00:00
Richard Smith
9b09c391dd Revert accidentally-committed files.
llvm-svn: 208034
2014-05-06 01:46:26 +00:00
Richard Smith
55381ccf0a Re-commit r208025, reverted in r208030, with a fix for a conformance issue
which GCC detects and Clang does not!

llvm-svn: 208033
2014-05-06 01:44:26 +00:00
Duncan P. N. Exon Smith
0f197f154c C++11: Compatibility with (C++03 => MSVC)
llvm-svn: 206481
2014-04-17 18:02:36 +00:00
Duncan P. N. Exon Smith
5e471911e7 C++11: Document some limitations imposed by MSVC
llvm-svn: 206480
2014-04-17 18:02:34 +00:00
Sean Silva
6361f43825 [docs] Fix up some links to the preferred style.
:doc:`...` and :ref:`...` links help Sphinx keep track the dependencies
between documents and ensure that they are not pointing to nowhere.

Raw HTML links work just fine and are easier for people less familiar
with reST/Sphinx. They are easy to change over to the :doc:/:ref: style
after the fact so this is not a problem.

This commit doesn't fix all of them.

llvm-svn: 205792
2014-04-08 21:06:22 +00:00
Duncan P. N. Exon Smith
a9cfb73640 C++11: Remove const from in auto guidelines
Using const is orthogonal to guidelines on using auto& and auto*.

llvm-svn: 203257
2014-03-07 18:06:15 +00:00
Duncan P. N. Exon Smith
dd4a6c3b71 C++11: Copy pointers with const auto *
llvm-svn: 203254
2014-03-07 17:23:29 +00:00
Reid Kleckner
293dbc48d1 Avoid std::function until PR19030 is fixed
We'd like to keep the clang-cl self-host working until we implement
MSVC-compatible RTTI.

Differential Revision: http://llvm-reviews.chandlerc.com/D2930

llvm-svn: 202758
2014-03-03 21:12:13 +00:00
Peter Collingbourne
a1148d5624 Document that std::initializer_list is not always available.
Differential Revision: http://llvm-reviews.chandlerc.com/D2923

llvm-svn: 202750
2014-03-03 19:54:42 +00:00
Duncan P. N. Exon Smith
62e007cecd C++11: Beware unnecessary copies with auto
It's easy to copy unintentionally when using 'auto', particularly inside
range-based for loops.  Best practise is to use 'const&' unless there's
a good reason not to.

llvm-svn: 202729
2014-03-03 16:48:47 +00:00
Duncan P. N. Exon Smith
fa701abe62 Clarify struct usage guidelines
The current coding standards restrict the use of struct to PODs, but no
one has been following them.  This patch updates the standards to
clarify when structs are dangerous and describe common practice in LLVM.

llvm-svn: 202728
2014-03-03 16:48:44 +00:00
Chandler Carruth
bb650c75f6 [C++11] Suggest placing callable arguments as the last argument to
facilitate the nice formatting of lambdas passed there. Suggested by
Chris during review of my lambda additions, and something I strongly
agree with.

llvm-svn: 202622
2014-03-02 09:13:39 +00:00
Chandler Carruth
86967b3e4a [C++11] Update the coding standards to provide some important guidance
about a few constructs in C++11 that are worth starting off in
a consistent manner within the codebase.

This will be matched with a change to clang-format's LLVM style which
will switch the options to support C++11 and use these conventions.

llvm-svn: 202620
2014-03-02 08:38:35 +00:00
Sean Silva
cca8d3716d [docs] Fix some Sphinx warnings.
The docs now build cleanly. Yay!

The following warnings were fixed:

/home/sean/pg/llvm/llvm/docs/HowToReleaseLLVM.rst:364: WARNING: Enumerated list ends without a blank line; unexpected unindent.
/home/sean/pg/llvm/llvm/docs/InAlloca.rst:: WARNING: document isn't included in any toctree

/home/sean/pg/llvm/llvm/docs/CodingStandards.rst:85: WARNING: Title underline too short.

Supported C++11 Language and Library Features
-------------------------------------------
/home/sean/pg/llvm/llvm/docs/CodingStandards.rst:85: WARNING: Title underline too short.

Supported C++11 Language and Library Features
-------------------------------------------
/home/sean/pg/llvm/llvm/docs/GettingStarted.rst:185: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/sean/pg/llvm/llvm/docs/GettingStarted.rst:565: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/sean/pg/llvm/llvm/docs/GettingStarted.rst:567: WARNING: Block quote ends without a blank line; unexpected unindent.

llvm-svn: 202603
2014-03-02 00:21:42 +00:00
Chandler Carruth
9d5983304a [docs] Update the docs to remove my hedging about C++98 vs. C++11. =]
The switch has been thrown. While I'm still watching for any failures or
problems with this, the documentation can go ahead and move forward.

llvm-svn: 202566
2014-03-01 02:48:03 +00:00
Chandler Carruth
6f3be2854a [docs] Clarify that there isn't much to be done other than watch build
bots when using the standard library facilities. The missing pieces here
aren't always in useful discreet chunks.

Fortunately, the missing pieces are few and far between, and we can
emulate most of them in our headers as needed.

Based on feedback from Lang and Dave.

llvm-svn: 202548
2014-02-28 21:59:51 +00:00
Richard Smith
beb8e08dc9 Add more whitespace to fix more bullets.
llvm-svn: 202538
2014-02-28 21:14:25 +00:00
Richard Smith
9ca622059d Add whitespace to try to fix bulleted list.
llvm-svn: 202537
2014-02-28 21:11:28 +00:00
Ben Langmuir
abcdcf5363 Fix some links to C++11 feature papers in the Coding Standards
llvm-svn: 202532
2014-02-28 19:37:20 +00:00
Chandler Carruth
7d25d4ed83 [docs] Add a section to the coding standards about languages and such.
A lot of this is writing down common knowledge and things often
communicated on mailing lists and in discussions. It could live in the
Programmer's Manual alternatively, but that felt slightly less
well-fitting.

It also includes (and was motivated by) the section on the relevant
language standards for LLVM and the specific features that will be
enabled with the switch to C++11.

With this, all of the documentation for the C++11 switch is, I think, in
place. I plan to flip the switch RSN. =]

llvm-svn: 202497
2014-02-28 13:35:54 +00:00
Chandler Carruth
650633b062 [docs] A slight tweak to the intro for the golden rule in the coding
standards.

It claims the document intentionally doesn't give fixed standards for
brace placement or spacing, and then the document goes on to do
precisely that in several places. Instead, try to highlight that even
these rules are simply *guidance* which may be trumped by some other
circumstance or the local conventions of code.

I'm not trying to change the thrust of this part of the document, and if
folks think this does so, I'm happy to re-wordsmith it. I just don't
want it to be so self-contradicting.

llvm-svn: 202495
2014-02-28 12:24:18 +00:00
Chandler Carruth
3b00074dde Revert my commit in r199620 that added sections about namespaces to the
coding standards, and instead fix the existing section.

Thanks to Daniel Jasper for pointing out we already had a section
devoted to this topic. Instead of adding sections, just hack on this
section some. Also fix the example in the anonymous namespace section
below it to agree with the new advice.

As a re-cap, this switches the LLVM preferred style to never indent
namespaces. Having two approaches just led to endless (and utterly
pointless) debates about what was "small enough". This wasn't helping
anyone. The no-indent rule is easy to understand and doesn't really make
anything harder to read. Moreover, with tools like clang-format it is
considerably nicer to have simple consistent rules.

llvm-svn: 199637
2014-01-20 10:15:32 +00:00
Chandler Carruth
ce67c2b578 Add some wording to the coding standards to say how to indent namespaces
(and to mention namespace ending comments). This is based on a quick
discussion on the developer mailing list where there was essentially no
objections to a simple and consistent rule. This should avoid future
debates about whether or not a namespace is "big enough" to indent. It
also matches clang-format's current behavior with LLVM source code which
hasn't really seen any opposition in code reviews that I spot checked.

llvm-svn: 199620
2014-01-20 01:40:43 +00:00
Alp Toker
e845f8af67 Correct word hyphenations
This patch tries to avoid unrelated changes other than fixing a few
hyphen-related ambiguities and contractions in nearby lines.

llvm-svn: 196471
2013-12-05 05:44:44 +00:00
Chris Lattner
4fe35f8960 Revert r189704, which removed the guidance about not duplicating doc comments.
This is under active discussion.

llvm-svn: 189730
2013-09-01 15:48:08 +00:00
Chris Lattner
facd9ef8f5 Remove the suggestion to not duplicate comments in header and
implementation files.  While doc generation systems don't need this,
humans do benefit from it.  Not everyone reads all code through doxygen.

llvm-svn: 189704
2013-08-30 23:06:20 +00:00