[clazy] [Bug 370609] Crash with a simple template class and auto for loop

2016-10-14 Thread Csaba Kertész via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=370609

Csaba Kertész  changed:

   What|Removed |Added

 Status|RESOLVED|VERIFIED

--- Comment #4 from Csaba Kertész  ---
I tested the fix and Clazy works again.

-- 
You are receiving this mail because:
You are watching all bug changes.

[clazy] [Bug 370609] Crash with a simple template class and auto for loop

2016-10-12 Thread Csaba Kertész via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=370609

--- Comment #2 from Csaba Kertész  ---
Created attachment 101551
  --> https://bugs.kde.org/attachment.cgi?id=101551=edit
File #2 after crash

-- 
You are receiving this mail because:
You are watching all bug changes.

[clazy] [Bug 370609] Crash with a simple template class and auto for loop

2016-10-12 Thread Csaba Kertész via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=370609

--- Comment #1 from Csaba Kertész  ---
Created attachment 101550
  --> https://bugs.kde.org/attachment.cgi?id=101550=edit
File #1 after crash

-- 
You are receiving this mail because:
You are watching all bug changes.

[clazy] [Bug 370609] New: Crash with a simple template class and auto for loop

2016-10-12 Thread Csaba Kertész via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=370609

Bug ID: 370609
   Summary: Crash with a simple template class and auto for loop
   Product: clazy
   Version: unspecified
  Platform: Ubuntu Packages
OS: Linux
Status: UNCONFIRMED
  Severity: crash
  Priority: NOR
 Component: general
  Assignee: unassigned-b...@kde.org
  Reporter: csaba.kert...@gmail.com
CC: smart...@kde.org

Compile the following code snippet with the bleeding edge clazy and clang 3.8
or 3.9:

clazy -std=gnu++11 -o example.cpp.o -c example.cpp

example.cpp:

#include 

template 
struct Example
{
  Example()
  {
for (auto sample : SampleCache)
{
}
  }

  std::vector SampleCache;
};

void CreateExample()
{
new Example();
}



Reproducible: Always

Steps to Reproduce:
1.  Compile example.cpp with Clazy.


Actual Results:  
Crash.

Expected Results:  
Clazy should not crash.

The code compiles fine with clang, only Clazy crashes.

Stack trace:

#0 0x7fc2896c7c68 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/lib/x86_64-linux-gnu/libLLVM-3.9.so.1+0x67fc68)
#1 0x7fc2896c5dde llvm::sys::RunSignalHandlers()
(/usr/lib/x86_64-linux-gnu/libLLVM-3.9.so.1+0x67ddde)
#2 0x7fc2896c5f2c (/usr/lib/x86_64-linux-gnu/libLLVM-3.9.so.1+0x67df2c)
#3 0x7fc28bc113d0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x113d0)
#4 0x0154c18b clang::ASTContext::getTypeInfoImpl(clang::Type const*)
const (/usr/lib/llvm-3.9/bin/clang+0x154c18b)
#5 0x0154332c clang::ASTContext::getTypeInfo(clang::Type const*) const
(/usr/lib/llvm-3.9/bin/clang+0x154332c)
#6 0x7fc285d06ebc TypeUtils::classifyQualType(clang::CompilerInstance
const&, clang::VarDecl const*, TypeUtils::QualTypeClassification&,
clang::Stmt*) (/usr/lib/x86_64-linux-gnu/libclazylib.so.0+0x126ebc)
#7 0x7fc2865b3032
RangeLoop::checkPassByConstRefCorrectness(clang::CXXForRangeStmt*)
(/usr/lib/x86_64-linux-gnu/ClangLazy.so+0x34b032)
#8 0x7fc2865b2dd9 RangeLoop::processForRangeLoop(clang::CXXForRangeStmt*)
(/usr/lib/x86_64-linux-gnu/ClangLazy.so+0x34add9)
#9 0x7fc2865dbe1c (/usr/lib/x86_64-linux-gnu/ClangLazy.so+0x373e1c)
#10 0x7fc2865d4a22 (/usr/lib/x86_64-linux-gnu/ClangLazy.so+0x36ca22)
#11 0x7fc2865d1b61 (/usr/lib/x86_64-linux-gnu/ClangLazy.so+0x369b61)
#12 0x7fc2865dce97 (/usr/lib/x86_64-linux-gnu/ClangLazy.so+0x374e97)
#13 0x7fc2865cfd3d (/usr/lib/x86_64-linux-gnu/ClangLazy.so+0x367d3d)
#14 0x7fc2865cf2a3 (/usr/lib/x86_64-linux-gnu/ClangLazy.so+0x3672a3)
#15 0x7fc2865cec45 (/usr/lib/x86_64-linux-gnu/ClangLazy.so+0x366c45)
#16 0x7fc2865d0b04 (/usr/lib/x86_64-linux-gnu/ClangLazy.so+0x368b04)
#17 0x00a5e648
clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&)
(/usr/lib/llvm-3.9/bin/clang+0xa5e648)
#18 0x00c613fa clang::ParseAST(clang::Sema&, bool, bool)
(/usr/lib/llvm-3.9/bin/clang+0xc613fa)
#19 0x00a376be clang::FrontendAction::Execute()
(/usr/lib/llvm-3.9/bin/clang+0xa376be)
#20 0x00a0a056
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/lib/llvm-3.9/bin/clang+0xa0a056)
#21 0x00ab2612
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/lib/llvm-3.9/bin/clang+0xab2612)
#22 0x00714968 cc1_main(llvm::ArrayRef, char const*,
void*) (/usr/lib/llvm-3.9/bin/clang+0x714968)
#23 0x00707f2a main (/usr/lib/llvm-3.9/bin/clang+0x707f2a)
#24 0x7fc2881b0830 __libc_start_main
/build/glibc-GKVZIf/glibc-2.23/csu/../csu/libc-start.c:325:0
#25 0x00712d39 _start (/usr/lib/llvm-3.9/bin/clang+0x712d39)
Stack dump:
0.  Program arguments: /usr/lib/llvm-3.9/bin/clang -cc1 -triple
x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier
-discard-value-names -main-file-name example.cpp -mrelocation-model static
-mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-dwarf-column-info -debugger-tuning=gdb -coverage-file
/home/build/aiboplus/aiboplus/mindcommon/tests/example.cpp.o -resource-dir
/usr/lib/llvm-3.9/bin/../lib/clang/3.9.1 -internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/x86_64-linux-gnu/c++/5.4.0
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/x86_64-linux-gnu/c++/5.4.0
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/backward
-internal-isystem /usr/local/include -internal-isystem
/usr/lib/llvm-3.9/bin/../lib/clang/3.9.1/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -std=gnu++11 -fdeprecated-macro
-fdebug-compilation-dir /home/build/aiboplus/aiboplus/mindcommon/tests
-ferror-limit 19 -fmessage-length 179 

[clazy] [Bug 368072] New: -Werror has no effect with Clazy

2016-08-31 Thread Csaba Kertész via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=368072

Bug ID: 368072
   Summary: -Werror has no effect with Clazy
   Product: clazy
   Version: unspecified
  Platform: Other
OS: Linux
Status: UNCONFIRMED
  Severity: normal
  Priority: NOR
 Component: general
  Assignee: unassigned-b...@kde.org
  Reporter: csaba.kert...@gmail.com
CC: smart...@kde.org

The compilation does not stop after a clazy warning is found despite -Werror is
added to the compiler options.

-- 
You are receiving this mail because:
You are watching all bug changes.


[clazy] [Bug 368068] New: Add global option to exclude a particular check from a level

2016-08-31 Thread Csaba Kertész via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=368068

Bug ID: 368068
   Summary: Add global option to exclude a particular check from a
level
   Product: clazy
   Version: unspecified
  Platform: Other
OS: Linux
Status: UNCONFIRMED
  Severity: normal
  Priority: NOR
 Component: general
  Assignee: unassigned-b...@kde.org
  Reporter: csaba.kert...@gmail.com
CC: smart...@kde.org

It would be nice to have the option to exclude certain checks from the levels.
E.g having all check from level0 and level1 excluding non-pod-global-static:

export CLAZY_CHECKS="level0,level1,-non-pod-global-static"

-- 
You are receiving this mail because:
You are watching all bug changes.