[PATCH] Support for JavaScript === and !== operators.

Alexander Kornienko alexfh at google.com
Wed Nov 20 06:06:03 PST 2013


  Heh, phab dies on our test file =]

  Here's the diff:

    Index: unittests/Format/FormatTest.cpp
    ===================================================================
    --- unittests/Format/FormatTest.cpp     (revision 195246)
    +++ unittests/Format/FormatTest.cpp     (working copy)
    @@ -7309,5 +7309,13 @@
       verifyFormat("A<A<int>>();", Spaces);
     }

    +
    +TEST_F(FormatTest, UnderstandsJavaScript) {
    +  verifyFormat("a === b;");
    +  verifyFormat("aaaaaaa === b;", getLLVMStyleWithColumns(10));
    +  verifyFormat("a !== b;");
    +  verifyFormat("aaaaaaa !== b;", getLLVMStyleWithColumns(10));
    +}
    +
     } // end namespace tooling
     } // end namespace clang

http://llvm-reviews.chandlerc.com/D2231



More information about the cfe-commits mailing list