[PATCH] D36672: [clang-tidy] readability-non-const-parameter: fixit on all function declarations

2017-12-06 Thread Anders Rönnholm via Phabricator via cfe-commits
AndersRonnholm abandoned this revision. AndersRonnholm added a comment. Fixed by https://reviews.llvm.org/rL319021. At least for c/c++ not sure if it handles objective-c. Repository: rL LLVM https://reviews.llvm.org/D36672 ___ cfe-commits

[PATCH] D36672: [clang-tidy] readability-non-const-parameter: fixit on all function declarations

2017-09-08 Thread Anders Rönnholm via Phabricator via cfe-commits
AndersRonnholm marked 2 inline comments as done. AndersRonnholm added inline comments. Comment at: clang-tidy/readability/NonConstParameterCheck.cpp:147 +if (const auto *Parent = Par->getParentFunctionOrMethod()) { + if (const auto *F = dyn_cast(Parent)) { +

[PATCH] D36672: [clang-tidy] readability-non-const-parameter: fixit on all function declarations

2017-09-08 Thread Anders Rönnholm via Phabricator via cfe-commits
AndersRonnholm updated this revision to Diff 114346. AndersRonnholm added a comment. Herald added subscribers: xazax.hun, JDevlieghere. Fixed comments Repository: rL LLVM https://reviews.llvm.org/D36672 Files: clang-tidy/readability/NonConstParameterCheck.cpp

[PATCH] D36672: readability-non-const-parameter: fixit on all function declarations

2017-08-14 Thread Anders Rönnholm via Phabricator via cfe-commits
AndersRonnholm created this revision. Fixes issue reported in https://bugs.llvm.org/show_bug.cgi?id=33219 Repository: rL LLVM https://reviews.llvm.org/D36672 Files: clang-tidy/readability/NonConstParameterCheck.cpp test/clang-tidy/readability-non-const-parameter.cpp Index:

[PATCH] D36670: misc-misplaced-widening-cast: fix assertion

2017-08-14 Thread Anders Rönnholm via Phabricator via cfe-commits
AndersRonnholm created this revision. AndersRonnholm added a project: clang-tools-extra. Fixes assert reported in https://bugs.llvm.org/show_bug.cgi?id=33660 Repository: rL LLVM https://reviews.llvm.org/D36670 Files: clang-tidy/misc/MisplacedWideningCastCheck.cpp

[PATCH] D31650: [Analyzer] Detect when function pointer is freed

2017-04-20 Thread Anders Rönnholm via Phabricator via cfe-commits
AndersRonnholm updated this revision to Diff 95929. AndersRonnholm added a comment. Updated after comments Repository: rL LLVM https://reviews.llvm.org/D31650 Files: lib/StaticAnalyzer/Checkers/MallocChecker.cpp test/Analysis/malloc.c Index: test/Analysis/malloc.c

[PATCH] D31650: [Analyzer] Detect when function pointer is freed

2017-04-04 Thread Anders Rönnholm via Phabricator via cfe-commits
AndersRonnholm created this revision. The MallocChecker does not currently detect freeing of function pointers. Example code. void (*fnptr)(int); void freeIndirectFunctionPtr() { void *p = (void*)fnptr; free(p); // expected-warning {{Argument to free() points to a function