tag:github.com,2008:https://github.com/dougpuob/cppnamelint/releasesTags from cppnamelint2021-03-27T14:57:52Ztag:github.com,2008:Repository/152830011/v0.3.42021-03-29T09:06:11Zv0.3.4: Bugfix(#55)<p>Issue 55 failed to handle source code of modern cpp tutorial (<a class="issue-link js-issue-link" href="https://github.com/dougpuob/cppnamelint/pull/57">#57</a>)</p>
<p>* Trying to fix issue <a class="issue-link js-issue-link" href="https://github.com/dougpuob/cppnamelint/issues/55">#55</a> (Most checks with c++ files fail with "Error while processing" (v0.3.3))</p>
<p>* Add a test case for issue <a class="issue-link js-issue-link" href="https://github.com/dougpuob/cppnamelint/issues/55">#55</a>.
<br />This case copies from `<a href="https://github.com/changkun/modern-cpp-tutorial/blob/master/code/1/1.1.c.and.cpp`">https://github.com/changkun/modern-cpp-tutorial/blob/master/code/1/1.1.c.and.cpp`</a>.</p>
<p>* Fixed issue <a class="issue-link js-issue-link" href="https://github.com/dougpuob/cppnamelint/issues/55">#55</a> which showed "Error while processing" on Linux. Seems like that the first line of source code begins with an empty single comment (`//`).</p>
<p>[Why]
<br />If it begins with an empty single comment (`//`), that causes wrong job number(correct is 1, but got 2). The `//` was treated as a path so added as a job.</p>
<p>- This causes a branch(Jobs.size() is 2, but should be 1) returns `nullptr` in the Tooling.cpp!getCC1Arguments() function.
<br />- The `//` from input source code file make the DiagnoseInputExistence() function true, then it causes Jobs object increases to 2 in Driver.cpp!Driver::BuildInputs() function.</p>
<p>[HowToFix]
<br />Compared with the bottom comparison of [GOOD case] and [BAD case], the "--language=c++" in BAD case. It is added in ``./source/Common.cpp!RunCheck()` function by Clang API with the `ArgumentInsertPosition::BEGIN` parameter. Changed it to `::END` to fix this issue.</p>
<p>[GOOD case]
<br />[0]:0x55555a1e8c60 "/home/dougpuob/petzone/cppnamelint/cppnamelint.git/build/linux/output/clang-tool"
<br />[1]:0x55555a1dc520 "//"
<br />[2]:0x55555a1dc540 "// 1.1.cpp"
<br />[3]:0x55555a1dc560 "//"
<br />[4]:0x55555a1e9970 "// chapter 1 introduction"
<br />[5]:0x55555a1e9950 "// modern cpp tutorial"
<br />[6]:0x55555a1dc5c0 "//"
<br />[7]:0x55555a1db020 "// created by changkun at changkun.de"
<br />[8]:0x55555a1debb0 "// <a href="https://github.com/changkun/modern-cpp-tutorial">https://github.com/changkun/modern-cpp-tutorial</a>"
<br />[9]:0x55555a1dc620 "//"
<br />[10]:0x55555a1db000 "#include \"foo.h\""
<br />[11]:0x55555a1dafe0 "#include <iostream>"
<br />[12]:0x55555a1dafc0 "#include <functional>"
<br />[13]:0x55555a1dc6a0 "int main() {"
<br />[14]:0x55555a1daf50 "// use lambda expression"
<br />[15]:0x55555a1daee0 "[out = std::ref(std::cout << \"Result from C code: \" << add(1, 2))](){"
<br />[16]:0x55555a1daf30 "out.get() << \".\\n\";"
<br />[17]:0x55555a1dc720 "}();"
<br />[18]:0x55555a1dc740 "return 0;"
<br />[19]:0x55555a1dc760 "}"
<br />[20]:0x55555a1daeb0 "int myfunc() {return 0;}"
<br />[21]:0x55555a1daf80 "/home/dougpuob/petzone/cppnamelint/1.1.c.and.cpp"
<br />[22]:0x55555a1dc7c0 "-fsyntax-only"
<br />[23]:0x55555a1dc7e0 "--language=c++"
<br />[24]:0x55555a1debf0 "-resource-dir=/home/dougpuob/petzone/cppnamelint/cppnamelint.git/build/linux/lib/clang/12.0.0"</p>
<p>[BAD case]
<br />[0]:0x55555a1e8c60 "/home/dougpuob/petzone/cppnamelint/cppnamelint.git/build/linux/output/clang-tool"
<br />[1]:0x55555a1dc520 "--language=c++"
<br />[2]:0x55555a1dc540 "//"
<br />[3]:0x55555a1dc560 "// 1.1.cpp"
<br />[4]:0x55555a1dc580 "//"
<br />[5]:0x55555a1e9970 "// chapter 1 introduction"
<br />[6]:0x55555a1e9950 "// modern cpp tutorial"
<br />[7]:0x55555a1dc5e0 "//"
<br />[8]:0x55555a1db020 "// created by changkun at changkun.de"
<br />[9]:0x55555a1debb0 "// <a href="https://github.com/changkun/modern-cpp-tutorial">https://github.com/changkun/modern-cpp-tutorial</a>"
<br />[10]:0x55555a1dc640 "//"
<br />[11]:0x55555a1db000 "#include \"foo.h\""
<br />[12]:0x55555a1dafe0 "#include <iostream>"
<br />[13]:0x55555a1dafc0 "#include <functional>"
<br />[14]:0x55555a1dc6c0 "int main() {"
<br />[15]:0x55555a1daf50 "// use lambda expression"
<br />[16]:0x55555a1daee0 "[out = std::ref(std::cout << \"Result from C code: \" << add(1, 2))](){"
<br />[17]:0x55555a1daf30 "out.get() << \".\\n\";"
<br />[18]:0x55555a1dc740 "}();"
<br />[19]:0x55555a1dc760 "return 0;"
<br />[20]:0x55555a1dc780 "}"
<br />[21]:0x55555a1daeb0 "int myfunc() {return 0;}"
<br />[22]:0x55555a1daf80 "/home/dougpuob/petzone/cppnamelint/1.1.c.and.cpp"
<br />[23]:0x55555a1dc7e0 "-fsyntax-only"
<br />[24]:0x55555a1debf0 "-resource-dir=/home/dougpuob/petzone/cppnamelint/cppnamelint.git/build/linux/lib/clang/12.0.0"</p>dougpuobtag:github.com,2008:Repository/152830011/v0.3.32020-06-14T01:41:03Zv0.3.3: Classified content in README.md file.<p>Trying to call `llvm::sys::fs::make_absolute()` in Linux and macOS on…</p>
<p>… Azure DevOps.</p>dougpuobtag:github.com,2008:Repository/152830011/v0.3.22020-04-23T01:47:34Zv0.3.2: Build Windows version with 64bit LLVM library.<p>Build Windows version with 64bit LLVM library.</p>
<p> 1. Changed C++ standard to C++17
<br /> 2. Changed MSVC2017 to MSVC2019.
<br /> 3. Changed 32bit to 64bit with Windows only. (Linux/macOS are 64bit already)</p>dougpuobtag:github.com,2008:Repository/152830011/v0.3.12020-04-11T12:21:43Zv0.3.1dougpuobtag:github.com,2008:Repository/152830011/v0.3.02020-04-11T11:21:35Zv0.3.0dougpuobtag:github.com,2008:Repository/152830011/v0.2.42019-08-10T10:10:31Zv0.2.4<p>Add declaration of structure and enumeration to test sample Sample/Sa…</p>
<p>…mple01UpperCamel.c.</p>
<p>Why:
<br />Add test cases.</p>
<p>HowToFix:
<br />Add them.</p>
<p>Reviewer:
<br />None.</p>dougpuobtag:github.com,2008:Repository/152830011/v0.2.02019-07-29T11:02:33Zv0.2.0dougpuobtag:github.com,2008:Repository/152830011/v0.1.32019-07-28T00:10:24Zv0.1.3<p>- Supported mutiple variables.</p>
<p>- Imported by refactoring.</p>dougpuobtag:github.com,2008:Repository/152830011/v0.1.22019-07-07T02:51:24Zv0.1.2dougpuobtag:github.com,2008:Repository/152830011/v0.1.12019-07-07T02:45:36Zv0.1.1dougpuob