• Home
  • Raw
  • Download

Lines Matching +full:exempt +full:- +full:issue +full:- +full:label

14 particularly important for large-scale code bases that follow a library-based
31 it up on the LLVM-dev mailing list.
37 want patches that do large-scale reformating of existing code. On the other
51 environment restrictions, historical restrictions, or due to third-party source
57 ---------------------
65 vendor-specific extensions, etc.
68 --------------------
82 ---------------------------------------------
95 * MSVC: http://msdn.microsoft.com/en-us/library/hh567368.aspx
116 * Strongly-typed and forward declarable enums: N2347_, N2764_
118 * Range-based for-loop: N2930_
121 ``{}`` are required around function-like macros inside range-based for
134 * Default member initializers (non-static data member initializers): N2756_
137 uninitialized. Non-scalar members generally have appropriate default
141 .. _N2118: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html
142 .. _N2439: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2439.htm
143 .. _N1720: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html
144 .. _N1984: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1984.pdf
145 .. _N1737: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1737.pdf
146 .. _N2541: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm
147 .. _N2927: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2927.pdf
148 .. _N2343: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf
149 .. _N1757: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1757.html
150 .. _N1987: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1987.htm
151 .. _N2431: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf
152 .. _N2347: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf
153 .. _N2764: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2764.pdf
154 .. _N2657: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm
155 .. _N2930: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2930.html
156 .. _N2928: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2928.htm
157 .. _N3206: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm
158 .. _N3272: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm
159 .. _N2429: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2429.htm
160 .. _N2242: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2242.pdf
161 .. _N2437: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf
162 .. _N2346: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm
163 .. _N2627: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm
164 .. _N1986: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1986.pdf
165 .. _N2756: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2756.htm
191 http://gcc.gnu.org/onlinedocs/gcc-4.7.3/libstdc++/manual/manual/status.html#status.iso.2011
194 ---------------
210 https://code.google.com/p/go-wiki/wiki/CodeReviewComments
216 ----------------------
236 .. code-block:: c++
238 //===-- llvm/Instruction.h - Instruction class definition -------*- C++ -*-===//
245 //===----------------------------------------------------------------------===//
251 //===----------------------------------------------------------------------===//
253 A few things to note about this particular format: The "``-*- C++ -*-``" string
281 used for and how it works. Every non-trivial class is expected to have a
318 Use the ``\file`` command to turn the standard file header into a file-level
322 member and non-member functions). Don't just restate the information that can
331 Wrap non-inline code examples in ``\code ... \endcode``.
343 .. code-block:: c++
350 .. code-block:: c++
381 .. code-block:: c++
385 /// Something - An abstraction for some complicated thing.
388 /// fooBar - Does foo and bar.
394 /// fooBar - Does foo and bar.
399 .. code-block:: c++
412 // Builds a B-tree in order to do foo. See paper by...
423 * using top-level groups to organize a collection of related functions at
431 .. code-block:: c++
477 order to reasonably allow developers to have multiple files side-by-side in
510 and tool-friendly formatting and indentation.
515 When formatting a multi-line lambda, format it like a block of code, that's
516 what it is. If there is only one multi-line lambda in a statement, and there
518 standard two space indent for a block of code, as if it were an if-block opened
521 .. code-block:: c++
523 std::sort(foo.begin(), foo.end(), [&](Foo a, Foo b) -> bool {
535 If there are multiple multi-line lambdas in a statement, or there is anything
539 .. code-block:: c++
541 dyn_switch(V->stripPointerCasts(),
569 formatting braced initialization lists: act as-if the braces were parentheses
573 .. code-block:: c++
588 ----------------------------
593 If your code has compiler warnings in it, something is wrong --- you aren't
605 .. code-block:: c++
616 .. code-block:: c++
647 That said, LLVM does make extensive use of a hand-rolled form of RTTI that use
649 This form of RTTI is opt-in and can be
661 <http://yosefk.com/c++fqa/ctors.html#fqa-10.12>`_ where the order of
668 <http://llvm.org/devmtg/2010-11/Gritz-OpenShadingLang.pdf>`_, etc). Due to the
674 --- a critical time for GUI apps, among others.
679 pressure on the VM system on low-memory machines.
687 constructors from LLVM, and then enable the ``-Wglobal-constructors`` warning
705 .. code-block:: c++
715 .. code-block:: c++
746 .. code-block:: c++
767 .. code-block:: c++
786 is a copy. Particularly in range-based ``for`` loops, careless copies are
792 .. code-block:: c++
803 for (auto *Ptr : Container) { Ptr->change(); }
808 The High-Level Issues
809 ---------------------
824 functions, classes, or data structures, but the important issue is how they work
851 **must** include all of the header files that you are using --- you can include
887 .. code-block:: c++
891 I->hasOneUse() && doOtherThing(I)) {
900 *only* does interesting things with non-terminator instructions, and only
911 .. code-block:: c++
920 if (!I->hasOneUse())
933 .. code-block:: c++
935 for (BasicBlock::iterator II = BB->begin(), E = BB->end(); II != E; ++II) {
937 Value *LHS = BO->getOperand(0);
938 Value *RHS = BO->getOperand(1);
946 exceeds more than 10-15 lines, it becomes difficult for people to read and
953 .. code-block:: c++
955 for (BasicBlock::iterator II = BB->begin(), E = BB->end(); II != E; ++II) {
959 Value *LHS = BO->getOperand(0);
960 Value *RHS = BO->getOperand(1);
977 flow --- like ``return``, ``break``, ``continue``, ``goto``, etc. For
980 .. code-block:: c++
1004 .. code-block:: c++
1024 .. code-block:: c++
1049 .. code-block:: c++
1053 if (BarList[I]->isFoo()) {
1067 .. code-block:: c++
1072 if (List[I]->isFoo())
1088 being faced with the in-line details of how we check to see if the BarList
1092 The Low-Level Issues
1093 --------------------
1098 Poorly-chosen names can mislead the reader and cause bugs. We cannot stress
1109 nouns and start with an upper-case letter (e.g. ``TextFileReader``).
1116 command-like function should be imperative. The name should be camel case,
1126 should start with an upper-case letter, just like types. Unless the
1131 convenience constants are exempt from the requirement for a prefix. For
1134 .. code-block:: c++
1142 style of lower-case words separated by underscores (e.g. ``begin()``,
1149 .. code-block:: c++
1153 Factory<Tire> F; // Bad -- abbreviation and non-descriptive.
1155 Factory<Tire> TireFactory; // Even better -- if VehicleMaker has more than one
1160 VehicleMaker M; // Might be OK if having a short life-span.
1161 Tire Tmp1 = M.makeTire(); // Bad -- 'Tmp1' provides no information.
1162 Light Headlight = M.makeLight("head"); // Good -- descriptive.
1180 .. code-block:: c++
1189 .. code-block:: c++
1191 assert(Ty->isPointerType() && "Can't allocate a non-pointer type!");
1199 assert(isa<PHINode>(Succ->front()) && "Only works on PHId BBs!");
1206 .. code-block:: c++
1216 .. code-block:: c++
1226 Another issue is that values used only by assertions will produce an "unused
1229 .. code-block:: c++
1245 .. code-block:: c++
1288 least one out-of-line virtual method in the class. Without this, the compiler
1295 ``-Wswitch`` warns if a switch, without a default label, over an enumeration
1296 does not cover every enumeration value. If you write a default label on a fully
1297 covered switch over an enumeration then the ``-Wswitch`` warning won't fire
1299 kinds of defaults, Clang has the warning ``-Wcovered-switch-default`` which is
1303 A knock-on effect of this stylistic requirement is that when building LLVM with
1304 GCC you may get warnings related to "control may reach end of non-void function"
1305 if you return from each case of a covered switch-over-enum because GCC assumes
1319 .. code-block:: c++
1322 for (BasicBlock::iterator I = BB->begin(); I != BB->end(); ++I)
1325 The problem with this construct is that it evaluates "``BB->end()``" every time
1330 .. code-block:: c++
1333 for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I)
1338 "``BB->end()``" may change its value every time through the loop and the second
1345 start of the loop. In this case, the cost is probably minor --- a few extra
1348 expression was actually something like: "``SomeMap[X]->end()``" and map lookups
1350 eliminate the issue entirely and don't even have to think about it.
1352 The second (even bigger) issue is that writing the loop in the first form hints
1370 problematic in this regard --- just ``<iostream>``. However, ``raw_ostream``
1401 .. code-block:: c++
1417 .. code-block:: c++
1428 .. code-block:: c++
1438 -------------------
1440 This section describes preferred low-level formatting guidelines along with
1447 statements, but not in normal function call expressions and function-like
1450 .. code-block:: c++
1463 .. code-block:: c++
1478 the arguments of the left-hand-side of a binary operator with the argument list
1482 .. code-block:: c++
1499 issue (for example, some iterators contains stack and set objects in them...
1514 .. code-block:: c++
1536 obvious for any reason. For example, the outer-most namespace in a header file
1565 .. code-block:: c++
1586 .. code-block:: c++
1620 <http://www.amazon.com/Effective-Specific-Addison-Wesley-Professional-Computing/dp/0321334876>`_
1624 #. `Large-Scale C++ Software Design
1625 <http://www.amazon.com/Large-Scale-Software-Design-John-Lakos/dp/0201633620/ref=sr_1_1>`_