X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FCodingStandards.html;h=3a7f8b3d1e9a33fd49c2f90f2ad53c4df070c216;hb=c7d3ab365fad15d2ce4e3f5f686a3503e3eeed56;hp=176f796cf4edb4a5682f51ddf2823bef16c2ad11;hpb=7ae36bbe06a86ac07aff9dc247359e51c653e1a3;p=oota-llvm.git diff --git a/docs/CodingStandards.html b/docs/CodingStandards.html index 176f796cf4e..3a7f8b3d1e9 100644 --- a/docs/CodingStandards.html +++ b/docs/CodingStandards.html @@ -1,652 +1,767 @@ - -A Few Coding Standards - - - - -
  A Few Coding Standards
+ + + + + A Few Coding Standards + + + +
+ A Few Coding Standards +
    -
  1. Introduction +
  2. Introduction
  3. 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 -
      -
    +
  4. Treat Compiler Warnings Like + Errors
  5. +
  6. Write Portable Code
  7. +
  8. Use of class/struct Keywords
  9. +
+
  • 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: Mon Jul 23 15:40:22 CDT 2001 - -
    - +
    + Valid CSS! + Valid HTML 4.01! + + Chris Lattner
    + LLVM Compiler Infrastructure
    + Last modified: $Date$ +
    + + +