Commit Graph

13 Commits

Author SHA1 Message Date
Dmitri Gribenko 2e77f0cf76 Added 'const' as suggested by ClangTidy llvm-qualified-auto 2020-03-13 11:49:23 +01:00
Marcel Hlopko db1f40d1a1 Modernize DeclTest
Summary:
This patch removes a call to the old ASTUnit::findFileRegionDecls and
replaces it with ast matchers.

Reviewers: gribozavr, gribozavr2

Reviewed By: gribozavr2

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D76121
2020-03-13 10:37:48 +01:00
Reid Kleckner c4d23d8854 Add a missing include to clang unit tests 2020-03-11 21:05:20 -07:00
Bjorn Pettersson 78424e5f84 Prune include of DataLayout.h from include/clang/Basic/TargetInfo.h. NFC
Summary:
Use a forward declaration of DataLayout instead of including
DataLayout.h in clangs TargetInfo.h. This reduces include
dependencies toward DataLayout.h (and other headers such as
DerivedTypes.h, Type.h that is included by DataLayout.h).

Needed to move implemantation of TargetInfo::resetDataLayout
from TargetInfo.h to TargetInfo.cpp.

Reviewers: rnk

Reviewed By: rnk

Subscribers: jvesely, nhaehnle, cfe-commits, llvm-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D69262

llvm-svn: 375438
2019-10-21 17:58:14 +00:00
Evgeniy Stepanov 8b5783194c Fix memory leak in DeclTest.
Fixes a leak introduced in r372903, detected on the ASan bot.
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/35430/steps/check-clang%20asan/logs/stdio

Direct leak of 192 byte(s) in 1 object(s) allocated from:
    #0 0x561d88 in operator new(unsigned long) /b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/asan_new_delete.cc:105
    #1 0x1a48779 in clang::ItaniumMangleContext::create(clang::ASTContext&, clang::DiagnosticsEngine&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ItaniumMangle.cpp:5134:10
    #2 0xdff000 in Decl_AsmLabelAttr_Test::TestBody() /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/unittests/AST/DeclTest.cpp:97:23

llvm-svn: 372925
2019-09-25 22:38:20 +00:00
Vedant Kumar f6bc251274 [Mangle] Add flag to asm labels to disable '\01' prefixing
LLDB synthesizes decls using asm labels. These decls cannot have a mangle
different than the one specified in the label name. I.e., the '\01' prefix
should not be added.

Fixes an expression evaluation failure in lldb's TestVirtual.py on iOS.

rdar://45827323

Differential Revision: https://reviews.llvm.org/D67774

llvm-svn: 372903
2019-09-25 18:00:31 +00:00
Chandler Carruth 2946cd7010 Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

llvm-svn: 351636
2019-01-19 08:50:56 +00:00
Tim Northover d1fafc8b05 Revert "Lexer: always allow imaginary constants in GNU mode."
This reverts r310423. It was committed by mistake, I intended to commit the
improved diagnostics for implicit conversions instead.

llvm-svn: 310426
2017-08-08 23:17:51 +00:00
Tim Northover 8fbb4c40b3 Lexer: always allow imaginary constants in GNU mode.
llvm-svn: 310423
2017-08-08 22:03:54 +00:00
Ahmed Charles b89843299a Replace OwningPtr with std::unique_ptr.
This compiles cleanly with lldb/lld/clang-tools-extra/llvm.

llvm-svn: 203279
2014-03-07 20:03:18 +00:00
NAKAMURA Takumi 05f4370074 ASTTests/DeclTest.cpp: Tweak on msvc target to add "-fno-ms-extensions".
MS extensions don't prefer imaginary suffix even with -std=c++11.

llvm-svn: 183301
2013-06-05 06:54:06 +00:00
Benjamin Kramer 8a8557e629 __uint128_t is only available on 64 bit platforms, only test it when it's around.
llvm-svn: 183146
2013-06-03 19:37:18 +00:00
Manuel Klimek a732899cb4 Fix memory leak for APValues that do memory allocation.
This patch ensures that APValues are deallocated with the ASTContext by
registering a deallocation function for APValues to the ASTContext.

Original version of the patch by James Dennett.

llvm-svn: 183101
2013-06-03 13:51:33 +00:00