X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;ds=sidebyside;f=docs%2FCodingStandards.html;h=6cfe5428356e59d6f2950e8dcaad4aac8f29b363;hb=ab4456f10a72f3a7c73dac0e95578b9b7e4250b8;hp=eb8235235d5ebe59c85514b44695b20c9ff8106d;hpb=d80c43c7472315a58fd9756f7fec240698d73956;p=oota-llvm.git diff --git a/docs/CodingStandards.html b/docs/CodingStandards.html index eb8235235d5..6cfe5428356 100644 --- a/docs/CodingStandards.html +++ b/docs/CodingStandards.html @@ -1,652 +1,772 @@ - -A Few Coding Standards - - - - -
  A Few Coding Standards
+ + + + + A Few Coding Standards + + + +
+ A Few Coding Standards +
    -
  1. Introduction -
  2. Mechanical Source Issues +
  3. Introduction
  4. +
  5. Mechanical Source Issues
    1. Source Code Formatting -
        -
      1. Commenting -
      2. Comment Formatting -
      3. Source Code Width -
      4. Use Spaces Instead of Tabs -
      5. Indent Code Consistently -
      +
        +
      1. Commenting
      2. +
      3. Comment Formatting
      4. +
      5. #include Style
      6. +
      7. Source Code Width
      8. +
      9. Use Spaces Instead of Tabs
      10. +
      11. Indent Code Consistently
      12. +
    2. Compiler Issues
        -
      1. Treat Compiler Warnings Like Errors -
      2. Which C++ features can I use? -
      3. Write Portable Code -
      -
    +
  6. Treat Compiler Warnings Like + Errors
  7. +
  8. Write Portable Code
  9. +
  10. Use of class/struct Keywords
  11. +
+
  • Style Issues
    1. The High Level Issues
        -
      1. A Public Header File is a Module -
      2. #include as Little as Possible -
      3. Keep "internal" Headers Private -
      +
    2. A Public Header File is a + Module
    3. +
    4. #include as Little as Possible
    5. +
    6. Keep "internal" Headers + Private
    7. +
    8. #include <iostream> is + forbidden
    9. +
  • The Low Level Issues
      -
    1. Assert Liberally -
    2. Prefer Preincrement -
    3. Exploit C++ to its Fullest -
    -
  • Writing Iterators - -
  • See Also -

    +

  • Assert Liberally
  • +
  • Do not use 'using namespace std'
  • +
  • Provide a virtual method anchor for + classes in headers
  • +
  • Prefer Preincrement
  • +
  • Avoid std::endl
  • + + +
  • See Also
  • + + +
    +

    Written by Chris Lattner and + Bill Wendling

    +
    -
    -Introduction -
    -Mechanical Source Issues -
       -Source Code Formatting -


    Commenting


    Comment Formatting


    Source Code Width


    Use Spaces Instead of Tabs


    Indent Code Consistently

       -Compiler Issues -


    Treat Compiler Warnings Like Errors


    Which C++ features can I use?


    Write Portable Code

    -Style Issues -
       -The High Level Issues -


    A Public Header File is a Module


    #include as Little as Possible


    Keep "internal" Headers Private

       -The Low Level Issues -


    Assert Liberally


    Prefer Preincrement


    Exploit C++ to its Fullest

       -Writing Iterators -
    -See Also -

    - -
    Chris Lattner
    - - -Last modified: Sun Jul 8 19:25:56 CDT 2001 - -
    - +
    + Valid CSS! + Valid HTML 4.01! + + Chris Lattner
    + LLVM Compiler Infrastructure
    + Last modified: $Date$ +
    + + +